mirror of
https://github.com/nestriness/nestri.git
synced 2026-05-01 19:03:08 +03:00
feat: Init
This commit is contained in:
@@ -2,3 +2,5 @@
|
|||||||
**/.git
|
**/.git
|
||||||
**/.env
|
**/.env
|
||||||
**/.idea
|
**/.idea
|
||||||
|
.git/
|
||||||
|
*.md
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
CLOUDFLARE_API_TOKEN=
|
|
||||||
NEON_API_TOKEN=
|
|
||||||
16
.github/CODEOWNERS
vendored
16
.github/CODEOWNERS
vendored
@@ -1,16 +0,0 @@
|
|||||||
* @dev-team
|
|
||||||
|
|
||||||
/apps/ @victorpahuus @AquaWolf
|
|
||||||
/packages/ui/ @wanjohiryan @victorpahuus @AquaWolf
|
|
||||||
|
|
||||||
/protobufs/ @AquaWolf @DatCaptainHorse
|
|
||||||
|
|
||||||
/infra/ @wanjohiryan
|
|
||||||
/packages/core/ @wanjohiryan
|
|
||||||
/packages/functions/ @wanjohiryan
|
|
||||||
|
|
||||||
/containerfiles/ @DatCaptainHorse
|
|
||||||
/packages/server/ @DatCaptainHorse
|
|
||||||
/packages/relay/ @DatCaptainHorse
|
|
||||||
/packages/scripts/ @DatCaptainHorse
|
|
||||||
/packages/input/ @DatCaptainHorse
|
|
||||||
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1 +0,0 @@
|
|||||||
polar: nestri
|
|
||||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,2 +0,0 @@
|
|||||||
## Description
|
|
||||||
<!-- Briefly describe the purpose and scope of your changes -->
|
|
||||||
32
.github/workflows/docker-bake.hcl
vendored
32
.github/workflows/docker-bake.hcl
vendored
@@ -1,32 +0,0 @@
|
|||||||
variable "BASE_IMAGE" {
|
|
||||||
default = "docker.io/cachyos/cachyos:latest"
|
|
||||||
}
|
|
||||||
|
|
||||||
group "default" {
|
|
||||||
targets = ["runner-base", "runner-builder"]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "runner-base" {
|
|
||||||
dockerfile = "containerfiles/runner-base.Containerfile"
|
|
||||||
context = "."
|
|
||||||
args = {
|
|
||||||
BASE_IMAGE = BASE_IMAGE
|
|
||||||
}
|
|
||||||
cache-from = ["type=gha,scope=runner-base-pr"]
|
|
||||||
cache-to = ["type=gha,scope=runner-base-pr,mode=max"]
|
|
||||||
tags = ["runner-base:latest"]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "runner-builder" {
|
|
||||||
dockerfile = "containerfiles/runner-builder.Containerfile"
|
|
||||||
context = "."
|
|
||||||
args = {
|
|
||||||
RUNNER_BASE_IMAGE = "runner-base:latest"
|
|
||||||
}
|
|
||||||
cache-from = ["type=gha,scope=runner-builder-pr"]
|
|
||||||
cache-to = ["type=gha,scope=runner-builder-pr,mode=max"]
|
|
||||||
tags = ["runner-builder:latest"]
|
|
||||||
contexts = {
|
|
||||||
runner-base = "target:runner-base"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
83
.github/workflows/play-standalone.yml
vendored
83
.github/workflows/play-standalone.yml
vendored
@@ -1,83 +0,0 @@
|
|||||||
name: Build Nestri standalone playsite
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "containerfiles/playsite.Containerfile"
|
|
||||||
- ".github/workflows/play-standalone.yml"
|
|
||||||
- "packages/play-standalone/**"
|
|
||||||
- "packages/input/**"
|
|
||||||
push:
|
|
||||||
branches: [ dev, production ]
|
|
||||||
paths:
|
|
||||||
- "containerfiles/playsite.Containerfile"
|
|
||||||
- ".github/workflows/play-standalone.yml"
|
|
||||||
- "packages/play-standalone/**"
|
|
||||||
- "packages/input/**"
|
|
||||||
tags:
|
|
||||||
- v*.*.*
|
|
||||||
release:
|
|
||||||
types: [ created ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: nestrilabs/nestri
|
|
||||||
BASE_TAG_PREFIX: playsite
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-docker-pr:
|
|
||||||
name: Build image on PR
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Setup Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Build Docker image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
file: containerfiles/playsite.Containerfile
|
|
||||||
context: ./
|
|
||||||
push: false
|
|
||||||
load: true
|
|
||||||
tags: nestri:playsite
|
|
||||||
|
|
||||||
build-and-push-docker:
|
|
||||||
name: Build and push image
|
|
||||||
if: ${{ github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/production' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Log into registry ${{ env.REGISTRY }}
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ github.token }}
|
|
||||||
- name: Extract Container metadata
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ env.BASE_TAG_PREFIX }}
|
|
||||||
#
|
|
||||||
#tag on release, and a nightly build for 'dev'
|
|
||||||
tags: |
|
|
||||||
type=raw,value=nightly,enable={{is_default_branch}}
|
|
||||||
type=raw,value={{branch}}
|
|
||||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'production') }}
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
- name: Build Docker image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
file: containerfiles/playsite.Containerfile
|
|
||||||
context: ./
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
88
.github/workflows/relay.yml
vendored
88
.github/workflows/relay.yml
vendored
@@ -1,88 +0,0 @@
|
|||||||
name: Build Nestri relay
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "containerfiles/relay.Containerfile"
|
|
||||||
- "packages/relay/**"
|
|
||||||
- ".github/workflows/relay.yml"
|
|
||||||
push:
|
|
||||||
branches: [dev, production]
|
|
||||||
paths:
|
|
||||||
- "containerfiles/relay.Containerfile"
|
|
||||||
- ".github/workflows/relay.yml"
|
|
||||||
- "packages/relay/**"
|
|
||||||
tags:
|
|
||||||
- v*.*.*
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: nestrilabs/nestri
|
|
||||||
BASE_TAG_PREFIX: relay
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-docker-pr:
|
|
||||||
name: Build image on PR
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Setup Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
-
|
|
||||||
name: Build Docker image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
file: containerfiles/relay.Containerfile
|
|
||||||
context: ./
|
|
||||||
push: false
|
|
||||||
load: true
|
|
||||||
tags: nestri:relay
|
|
||||||
|
|
||||||
build-and-push-docker:
|
|
||||||
name: Build and push image
|
|
||||||
if: ${{ github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/production' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Log into registry ${{ env.REGISTRY }}
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ github.token }}
|
|
||||||
-
|
|
||||||
name: Extract Container metadata
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ env.BASE_TAG_PREFIX }}
|
|
||||||
#
|
|
||||||
#tag on release, and a nightly build for 'dev'
|
|
||||||
tags: |
|
|
||||||
type=raw,value=nightly,enable={{is_default_branch}}
|
|
||||||
type=raw,value={{branch}}
|
|
||||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'production') }}
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
-
|
|
||||||
name: Build Docker image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
file: containerfiles/relay.Containerfile
|
|
||||||
context: ./
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
73
.github/workflows/runner-bases.yml
vendored
73
.github/workflows/runner-bases.yml
vendored
@@ -1,73 +0,0 @@
|
|||||||
name: Build Nestri runner base images
|
|
||||||
|
|
||||||
on: [ workflow_call ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: nestrilabs/nestri
|
|
||||||
BASE_IMAGE: docker.io/cachyos/cachyos:latest
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-push-bases:
|
|
||||||
name: Build and push images
|
|
||||||
if: ${{ github.ref == 'refs/heads/production' || github.ref == 'refs/heads/dev' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
variant:
|
|
||||||
- { suffix: "v2", base: "docker.io/cachyos/cachyos:latest" }
|
|
||||||
- { suffix: "v3", base: "docker.io/cachyos/cachyos-v3:latest" }
|
|
||||||
#- { suffix: "v4", base: "docker.io/cachyos/cachyos-v4:latest" } # Disabled until GHA has this
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Log into registry ${{ env.REGISTRY }}
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ github.token }}
|
|
||||||
- name: Setup Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Set Swap Space
|
|
||||||
uses: pierotofy/set-swap-space@master
|
|
||||||
with:
|
|
||||||
swap-size-gb: 20
|
|
||||||
- name: Build and push runner-base image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
file: containerfiles/runner-base.Containerfile
|
|
||||||
context: ./
|
|
||||||
push: true
|
|
||||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/runner-base:latest-${{ matrix.variant.suffix }}
|
|
||||||
build-args: |
|
|
||||||
BASE_IMAGE=${{ matrix.variant.base }}
|
|
||||||
cache-from: type=gha,scope=runner-base-${{ matrix.variant.suffix }},mode=max
|
|
||||||
cache-to: type=gha,scope=runner-base-${{ matrix.variant.suffix }},mode=max
|
|
||||||
pull: true
|
|
||||||
- name: Build and push runner-builder image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
file: containerfiles/runner-builder.Containerfile
|
|
||||||
context: ./
|
|
||||||
push: true
|
|
||||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/runner-builder:latest-${{ matrix.variant.suffix }}
|
|
||||||
build-args: |
|
|
||||||
RUNNER_BASE_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/runner-base:latest-${{ matrix.variant.suffix }}
|
|
||||||
cache-from: type=gha,scope=runner-builder-${{ matrix.variant.suffix }},mode=max
|
|
||||||
cache-to: type=gha,scope=runner-builder-${{ matrix.variant.suffix }},mode=max
|
|
||||||
- name: Build and push runner-common image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
file: containerfiles/runner-common.Containerfile
|
|
||||||
context: ./
|
|
||||||
push: true
|
|
||||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/runner-common:latest-${{ matrix.variant.suffix }}
|
|
||||||
build-args: |
|
|
||||||
RUNNER_BASE_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/runner-base:latest-${{ matrix.variant.suffix }}
|
|
||||||
RUNNER_BUILDER_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/runner-builder:latest-${{ matrix.variant.suffix }}
|
|
||||||
cache-from: type=gha,scope=runner-common-${{ matrix.variant.suffix }},mode=max
|
|
||||||
cache-to: type=gha,scope=runner-common-${{ matrix.variant.suffix }},mode=max
|
|
||||||
86
.github/workflows/runner-variants.yml
vendored
86
.github/workflows/runner-variants.yml
vendored
@@ -1,86 +0,0 @@
|
|||||||
name: Build Nestri runner image variants
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: 7 0 * * 1,3,6 # Nightlies
|
|
||||||
push:
|
|
||||||
branches: [ dev, production ]
|
|
||||||
paths:
|
|
||||||
- "containerfiles/*runner.Containerfile"
|
|
||||||
- ".github/workflows/runner-variants.yml"
|
|
||||||
- "packages/scripts/**"
|
|
||||||
- "packages/configs/**"
|
|
||||||
tags:
|
|
||||||
- v*.*.*
|
|
||||||
release:
|
|
||||||
types: [ created ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: nestrilabs/nestri
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
bases:
|
|
||||||
uses: ./.github/workflows/runner-bases.yml
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
build-and-push-variants:
|
|
||||||
needs: [ bases ]
|
|
||||||
name: Build and push images
|
|
||||||
if: ${{ github.ref == 'refs/heads/production' || github.ref == 'refs/heads/dev' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
variant:
|
|
||||||
- { suffix: "v2", base: "docker.io/cachyos/cachyos:latest" }
|
|
||||||
- { suffix: "v3", base: "docker.io/cachyos/cachyos-v3:latest" }
|
|
||||||
#- { suffix: "v4", base: "docker.io/cachyos/cachyos-v4:latest" } # Disabled until GHA has this
|
|
||||||
runner:
|
|
||||||
- steam
|
|
||||||
- heroic
|
|
||||||
- minecraft
|
|
||||||
# ADD MORE HERE AS NEEDED #
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Log into registry ${{ env.REGISTRY }}
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ github.token }}
|
|
||||||
- name: Extract runner metadata
|
|
||||||
id: meta-runner
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/runner
|
|
||||||
tags: |
|
|
||||||
type=raw,value=nightly-${{ matrix.runner }}-${{ matrix.variant.suffix }},enable={{is_default_branch}}
|
|
||||||
type=raw,value={{branch}}-${{ matrix.runner }}-${{ matrix.variant.suffix }}
|
|
||||||
type=raw,value=latest-${{ matrix.runner }}-${{ matrix.variant.suffix }},enable=${{ github.ref == format('refs/heads/{0}', 'production') }}
|
|
||||||
type=semver,pattern={{version}}-${{ matrix.runner }}-${{ matrix.variant.suffix }}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}-${{ matrix.runner }}-${{ matrix.variant.suffix }}
|
|
||||||
type=semver,pattern={{major}}-${{ matrix.runner }}-${{ matrix.variant.suffix }}
|
|
||||||
- name: Setup Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Set Swap Space
|
|
||||||
uses: pierotofy/set-swap-space@master
|
|
||||||
with:
|
|
||||||
swap-size-gb: 20
|
|
||||||
- name: Build and push runner image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
file: containerfiles/${{ matrix.runner }}-runner.Containerfile
|
|
||||||
context: ./
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta-runner.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta-runner.outputs.labels }}
|
|
||||||
build-args: |
|
|
||||||
RUNNER_COMMON_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/runner-common:latest-${{ matrix.variant.suffix }}
|
|
||||||
cache-from: type=gha,scope=runner-${{ matrix.runner }}-${{ matrix.variant.suffix }},mode=max
|
|
||||||
cache-to: type=gha,scope=runner-${{ matrix.runner }}-${{ matrix.variant.suffix }},mode=max
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -27,7 +27,6 @@ coverage
|
|||||||
# Build Outputs
|
# Build Outputs
|
||||||
.next/
|
.next/
|
||||||
out/
|
out/
|
||||||
build
|
|
||||||
dist
|
dist
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
671
LICENSE
671
LICENSE
@@ -1,671 +0,0 @@
|
|||||||
Copyright (c) 2023-present Nestri Labs, Inc.
|
|
||||||
|
|
||||||
Portions of this software are licensed as follows:
|
|
||||||
|
|
||||||
* All content that resides under https://github.com/nestrilabs/nestri/tree/dev/cloud and
|
|
||||||
https://github.com/nestrilabs/nestri/tree/production/cloud directory of this repository (Commercial License) is licensed under the license defined in "cloud/LICENSE".
|
|
||||||
* All third party components incorporated into the Nestri Software are licensed under the original license provided by the owner of the applicable component.
|
|
||||||
* Content outside of the above mentioned directories or restrictions above is available under the "AGPLv3" license as defined below.
|
|
||||||
|
|
||||||
|
|
||||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 19 November 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU Affero General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works, specifically designed to ensure
|
|
||||||
cooperation with the community in the case of network server software.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
our General Public Licenses are intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
Developers that use our General Public Licenses protect your rights
|
|
||||||
with two steps: (1) assert copyright on the software, and (2) offer
|
|
||||||
you this License which gives you legal permission to copy, distribute
|
|
||||||
and/or modify the software.
|
|
||||||
|
|
||||||
A secondary benefit of defending all users' freedom is that
|
|
||||||
improvements made in alternate versions of the program, if they
|
|
||||||
receive widespread use, become available for other developers to
|
|
||||||
incorporate. Many developers of free software are heartened and
|
|
||||||
encouraged by the resulting cooperation. However, in the case of
|
|
||||||
software used on network servers, this result may fail to come about.
|
|
||||||
The GNU General Public License permits making a modified version and
|
|
||||||
letting the public access it on a server without ever releasing its
|
|
||||||
source code to the public.
|
|
||||||
|
|
||||||
The GNU Affero General Public License is designed specifically to
|
|
||||||
ensure that, in such cases, the modified source code becomes available
|
|
||||||
to the community. It requires the operator of a network server to
|
|
||||||
provide the source code of the modified version running there to the
|
|
||||||
users of that server. Therefore, public use of a modified version, on
|
|
||||||
a publicly accessible server, gives the public access to the source
|
|
||||||
code of the modified version.
|
|
||||||
|
|
||||||
An older license, called the Affero General Public License and
|
|
||||||
published by Affero, was designed to accomplish similar goals. This is
|
|
||||||
a different license, not a version of the Affero GPL, but Affero has
|
|
||||||
released a new version of the Affero GPL which permits relicensing under
|
|
||||||
this license.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, if you modify the
|
|
||||||
Program, your modified version must prominently offer all users
|
|
||||||
interacting with it remotely through a computer network (if your version
|
|
||||||
supports such interaction) an opportunity to receive the Corresponding
|
|
||||||
Source of your version by providing access to the Corresponding Source
|
|
||||||
from a network server at no charge, through some standard or customary
|
|
||||||
means of facilitating copying of software. This Corresponding Source
|
|
||||||
shall include the Corresponding Source for any work covered by version 3
|
|
||||||
of the GNU General Public License that is incorporated pursuant to the
|
|
||||||
following paragraph.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the work with which it is combined will remain governed by version
|
|
||||||
3 of the GNU General Public License.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU Affero General Public License from time to time. Such new versions
|
|
||||||
will be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU Affero General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU Affero General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU Affero General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
Nestri: Your games, Your rules
|
|
||||||
Copyright (C) 2023 WanjohiRyan
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as published
|
|
||||||
by the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If your software can interact with users remotely through a computer
|
|
||||||
network, you should also make sure that it provides a way for users to
|
|
||||||
get its source. For example, if your program is a web application, its
|
|
||||||
interface could display a "Source" link that leads users to an archive
|
|
||||||
of the code. There are many ways you could offer source, and different
|
|
||||||
solutions will be better for different programs; see section 13 for the
|
|
||||||
specific requirements.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
23
README.md
23
README.md
@@ -1,23 +0,0 @@
|
|||||||
<p align="center">
|
|
||||||
<a href="https://nestri.io">
|
|
||||||
<picture>
|
|
||||||
<source srcset="packages/web/public/logo.white.svg" media="(prefers-color-scheme: dark)">
|
|
||||||
<source srcset="packages/web/public/logo.black.svg" media="(prefers-color-scheme: light)">
|
|
||||||
<img src="packages/web/public/logo.black.svg" alt="Nestri logo">
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
<p align="center">Deploy and stream games/apps in the cloud. Use our GPUs or bring your own.</p>
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://discord.com/invite/Y6etn3qKZ3"><img alt="Discord" src="https://img.shields.io/discord/1080111004698021909?style=flat-square&label=discord" /></a>
|
|
||||||
<a href="https://github.com/nestrilabs/nestri/blob/dev/LICENSE"><img alt="Nestri License" src="https://img.shields.io/github/license/nestriness/nestri?style=flat-square" /></a>
|
|
||||||
<a href="https://github.com/nestrilabs/nestri/actions/workflows/runner.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/nestrilabs/nestri/runner.yml?style=flat-square&branch=dev" /></a>
|
|
||||||
<!-- <a href="https://nestri.io" style="text-decoration: none;">
|
|
||||||
<img src="https://img.shields.io/badge/Start%20Playing%20Now-For%20$1/hour-brightgreen?style=flat-square" alt="Umami Demo" />
|
|
||||||
</a> -->
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- TODO: Add a link to the demo app when it's ready -->
|
|
||||||
<!-- TODO: Add a link to install for self-hosters -->
|
|
||||||
<!-- TODO: Add a CTA for hosted option -->
|
|
||||||
<!-- TODO: Add feature imagery like Lobechat -->
|
|
||||||
18
buf.gen.yaml
18
buf.gen.yaml
@@ -1,18 +0,0 @@
|
|||||||
version: v2
|
|
||||||
inputs:
|
|
||||||
- directory: protobufs
|
|
||||||
plugins:
|
|
||||||
# TypeScript (frontend)
|
|
||||||
- remote: buf.build/bufbuild/es
|
|
||||||
out: packages/input/src/proto
|
|
||||||
opt: target=ts
|
|
||||||
|
|
||||||
# Golang (relay)
|
|
||||||
- remote: buf.build/protocolbuffers/go
|
|
||||||
out: packages/relay/internal/proto
|
|
||||||
opt: paths=source_relative
|
|
||||||
|
|
||||||
# Rust (nestri-server)
|
|
||||||
- remote: buf.build/community/neoeinstein-prost
|
|
||||||
out: packages/server/src/proto
|
|
||||||
opt: flat_output_dir=true
|
|
||||||
484
build/Dockerfile
Normal file
484
build/Dockerfile
Normal file
@@ -0,0 +1,484 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
# =============================================================================
|
||||||
|
# Nestri – Unified Multi-stage Build
|
||||||
|
# =============================================================================
|
||||||
|
#
|
||||||
|
# Build graph (BuildKit runs independent branches in parallel):
|
||||||
|
#
|
||||||
|
# initial ─► builder ──┬─► libkrunfw-build ─► libkrun-build ──┐
|
||||||
|
# ├─► virgl-build ───────────────────────┤
|
||||||
|
# ├─► mesa-build ─► lib32-mesa-build │
|
||||||
|
# │ │
|
||||||
|
# └─► rust-builder ─┬─► gst-wayland-build
|
||||||
|
# ├─► wl-proxy-build
|
||||||
|
# ├─► nestrisink-build
|
||||||
|
# └─► muvm-build ◄─────┘
|
||||||
|
#
|
||||||
|
# initial ─► runner ◄── all build stages
|
||||||
|
#
|
||||||
|
# Build:
|
||||||
|
# docker buildx build --target runner -t nestri:latest .
|
||||||
|
#
|
||||||
|
# Recommended .dockerignore:
|
||||||
|
# target/
|
||||||
|
# .git/
|
||||||
|
# *.md
|
||||||
|
#
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# initial
|
||||||
|
#******************************************************************************
|
||||||
|
# Minimal updated Arch Linux base. Every other stage inherits from here.
|
||||||
|
FROM docker.io/archlinux/archlinux:latest AS initial
|
||||||
|
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -Syu --noconfirm
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# builder
|
||||||
|
#******************************************************************************
|
||||||
|
# builder has C/C++ tooling, makepkg, and a non-root build user.
|
||||||
|
FROM initial AS builder
|
||||||
|
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -S --noconfirm \
|
||||||
|
base-devel \
|
||||||
|
clang \
|
||||||
|
cmake \
|
||||||
|
git \
|
||||||
|
meson \
|
||||||
|
ninja \
|
||||||
|
python \
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
WORKDIR /scratch
|
||||||
|
|
||||||
|
ENV ARTIFACTS=/artifacts
|
||||||
|
RUN mkdir -p "$ARTIFACTS"
|
||||||
|
|
||||||
|
# makepkg refuses to run as root
|
||||||
|
RUN useradd -m builder \
|
||||||
|
&& echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
# Maximise build parallelism
|
||||||
|
RUN sed -i "s/#MAKEFLAGS=.*/MAKEFLAGS=\"-j$(nproc)\"/" /etc/makepkg.conf
|
||||||
|
|
||||||
|
# Let the builder user write to /scratch and /artifacts
|
||||||
|
RUN chgrp builder /scratch "$ARTIFACTS" \
|
||||||
|
&& chmod g+ws /scratch "$ARTIFACTS"
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# rust-builder
|
||||||
|
#******************************************************************************
|
||||||
|
# rust-builder adds the Rust toolchain and common crate build deps.
|
||||||
|
FROM builder AS rust-builder
|
||||||
|
|
||||||
|
ENV CARGO_HOME=/usr/local/cargo
|
||||||
|
ENV PATH="${CARGO_HOME}/bin:${PATH}"
|
||||||
|
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -S --noconfirm \
|
||||||
|
rust \
|
||||||
|
cargo \
|
||||||
|
gstreamer \
|
||||||
|
gst-plugins-base \
|
||||||
|
gst-plugins-good \
|
||||||
|
gst-plugins-bad \
|
||||||
|
libdrm \
|
||||||
|
libxkbcommon \
|
||||||
|
wayland \
|
||||||
|
wayland-protocols \
|
||||||
|
libinput \
|
||||||
|
libseccomp \
|
||||||
|
libcap
|
||||||
|
|
||||||
|
# cargo-c is needed by gst-wayland-display (cargo cinstall)
|
||||||
|
RUN --mount=type=cache,target=${CARGO_HOME}/registry \
|
||||||
|
--mount=type=cache,target=${CARGO_HOME}/git \
|
||||||
|
cargo install cargo-c
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# libkrunfw-build
|
||||||
|
#******************************************************************************
|
||||||
|
# Build libkrunfw package with 32-bit support.
|
||||||
|
FROM builder AS libkrunfw-build
|
||||||
|
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -S --noconfirm --needed \
|
||||||
|
bc \
|
||||||
|
python-pyelftools \
|
||||||
|
cpio \
|
||||||
|
curl \
|
||||||
|
wget
|
||||||
|
|
||||||
|
COPY build/packages/libkrunfw/ /scratch/libkrunfw/
|
||||||
|
WORKDIR /scratch/libkrunfw
|
||||||
|
|
||||||
|
RUN chown -R builder:builder .
|
||||||
|
USER builder
|
||||||
|
RUN makepkg --syncdeps --noconfirm --skippgpcheck \
|
||||||
|
&& cp *.zst "$ARTIFACTS"
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# libkrun-build
|
||||||
|
#******************************************************************************
|
||||||
|
# Build libkrun package (depends on libkrunfw).
|
||||||
|
FROM builder AS libkrun-build
|
||||||
|
|
||||||
|
# Install previously-built libkrunfw
|
||||||
|
WORKDIR /scratch
|
||||||
|
COPY --from=libkrunfw-build /artifacts/*.zst pkgs/
|
||||||
|
RUN pacman -U --noconfirm pkgs/*.zst && rm -rf pkgs
|
||||||
|
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -S --noconfirm --needed \
|
||||||
|
rust \
|
||||||
|
cargo \
|
||||||
|
patchelf \
|
||||||
|
clang \
|
||||||
|
clang18 \
|
||||||
|
pipewire \
|
||||||
|
virglrenderer
|
||||||
|
|
||||||
|
COPY build/packages/libkrun/ /scratch/libkrun/
|
||||||
|
WORKDIR /scratch/libkrun
|
||||||
|
|
||||||
|
RUN chown -R builder:builder .
|
||||||
|
USER builder
|
||||||
|
# NOTE: clang18 required – newer versions fail to build libkrun
|
||||||
|
RUN LIBCLANG_PATH=/usr/lib/llvm18/lib \
|
||||||
|
makepkg --syncdeps --noconfirm --skippgpcheck \
|
||||||
|
&& cp *.zst "$ARTIFACTS"
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# virgl-build
|
||||||
|
#******************************************************************************
|
||||||
|
# Build virglrenderer package.
|
||||||
|
FROM builder AS virgl-build
|
||||||
|
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -S --noconfirm --needed \
|
||||||
|
python-yaml \
|
||||||
|
libepoxy \
|
||||||
|
mesa \
|
||||||
|
libva \
|
||||||
|
libdrm \
|
||||||
|
vulkan-headers \
|
||||||
|
vulkan-icd-loader \
|
||||||
|
libx11 \
|
||||||
|
glu
|
||||||
|
|
||||||
|
COPY build/virglrenderer/ /scratch/virglrenderer/
|
||||||
|
WORKDIR /scratch/virglrenderer
|
||||||
|
|
||||||
|
RUN chown -R builder:builder .
|
||||||
|
USER builder
|
||||||
|
RUN makepkg --syncdeps --noconfirm --skippgpcheck --skipinteg \
|
||||||
|
&& cp *.zst "$ARTIFACTS"
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# mesa-build
|
||||||
|
#******************************************************************************
|
||||||
|
# Build Mesa packages (64-bit).
|
||||||
|
FROM builder AS mesa-build
|
||||||
|
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -S --noconfirm --needed \
|
||||||
|
git \
|
||||||
|
python-mako \
|
||||||
|
python-packaging \
|
||||||
|
python-yaml \
|
||||||
|
llvm \
|
||||||
|
rust \
|
||||||
|
rust-bindgen \
|
||||||
|
cbindgen \
|
||||||
|
clang \
|
||||||
|
glslang \
|
||||||
|
wayland-protocols \
|
||||||
|
libvdpau \
|
||||||
|
libva \
|
||||||
|
libxrandr
|
||||||
|
|
||||||
|
COPY build/mesa/ /scratch/mesa/
|
||||||
|
WORKDIR /scratch/mesa
|
||||||
|
|
||||||
|
RUN chown -R builder:builder .
|
||||||
|
USER builder
|
||||||
|
RUN makepkg --syncdeps --noconfirm --skippgpcheck --skipinteg \
|
||||||
|
&& cp *.zst "$ARTIFACTS"
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# lib32-mesa-build
|
||||||
|
#******************************************************************************
|
||||||
|
# Build 32-bit Mesa packages (depends on 64-bit mesa).
|
||||||
|
FROM builder AS lib32-mesa-build
|
||||||
|
|
||||||
|
# Enable multilib repository for 32-bit dependencies
|
||||||
|
RUN echo -e "\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" \
|
||||||
|
>> /etc/pacman.conf
|
||||||
|
|
||||||
|
# Install 64-bit mesa packages first
|
||||||
|
WORKDIR /scratch
|
||||||
|
COPY --from=mesa-build /artifacts/*.zst pkgs/
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -Syu --noconfirm \
|
||||||
|
&& pacman -U --noconfirm pkgs/*.zst \
|
||||||
|
&& rm -rf pkgs
|
||||||
|
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -S --noconfirm --needed \
|
||||||
|
git \
|
||||||
|
python-mako \
|
||||||
|
python-packaging \
|
||||||
|
python-yaml \
|
||||||
|
llvm \
|
||||||
|
rust \
|
||||||
|
rust-bindgen \
|
||||||
|
cbindgen \
|
||||||
|
clang \
|
||||||
|
glslang \
|
||||||
|
wayland-protocols \
|
||||||
|
libvdpau \
|
||||||
|
libva \
|
||||||
|
libxrandr \
|
||||||
|
lib32-gcc-libs \
|
||||||
|
lib32-libx11 \
|
||||||
|
lib32-libdrm \
|
||||||
|
lib32-llvm \
|
||||||
|
lib32-expat \
|
||||||
|
lib32-libelf \
|
||||||
|
lib32-zstd \
|
||||||
|
lib32-wayland
|
||||||
|
|
||||||
|
COPY build/packages/lib32-mesa/ /scratch/lib32-mesa/
|
||||||
|
WORKDIR /scratch/lib32-mesa
|
||||||
|
|
||||||
|
RUN chown -R builder:builder .
|
||||||
|
USER builder
|
||||||
|
RUN makepkg --syncdeps --noconfirm --skippgpcheck --skipinteg \
|
||||||
|
&& cp *.zst "$ARTIFACTS"
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# gst-wayland-build
|
||||||
|
#******************************************************************************
|
||||||
|
# Build gst-wayland-display plugin.
|
||||||
|
FROM rust-builder AS gst-wayland-build
|
||||||
|
|
||||||
|
WORKDIR /scratch/gst-wayland-display
|
||||||
|
RUN git clone https://github.com/games-on-whales/gst-wayland-display.git . \
|
||||||
|
&& git checkout 67b1183997fd7aaf57398e4b01bd64c4d2433c45
|
||||||
|
|
||||||
|
RUN --mount=type=cache,target=${CARGO_HOME}/registry \
|
||||||
|
--mount=type=cache,target=${CARGO_HOME}/git \
|
||||||
|
--mount=type=cache,target=/scratch/gst-wayland-display/target \
|
||||||
|
cargo cinstall --prefix="${ARTIFACTS}/usr" --release --features cuda
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# wl-proxy-build
|
||||||
|
#******************************************************************************
|
||||||
|
# Build wl-cross-domain-proxy.
|
||||||
|
FROM rust-builder AS wl-proxy-build
|
||||||
|
|
||||||
|
WORKDIR /scratch/wl-cross-domain-proxy
|
||||||
|
RUN git clone https://codeberg.org/drakulix/wl-cross-domain-proxy.git . \
|
||||||
|
&& git checkout c6ce1ca89fb4d6f4f18d3aaf88324d40d4589177
|
||||||
|
|
||||||
|
RUN --mount=type=cache,target=${CARGO_HOME}/registry \
|
||||||
|
--mount=type=cache,target=${CARGO_HOME}/git \
|
||||||
|
--mount=type=cache,target=/scratch/wl-cross-domain-proxy/target \
|
||||||
|
cargo build --release \
|
||||||
|
&& install -Dm755 target/release/wl-cross-domain-proxy \
|
||||||
|
"${ARTIFACTS}/usr/bin/wl-cross-domain-proxy"
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# nestrisink-build
|
||||||
|
#******************************************************************************
|
||||||
|
# Build nestri GStreamer sink plugin.
|
||||||
|
FROM rust-builder AS nestrisink-build
|
||||||
|
|
||||||
|
WORKDIR /scratch/nestrisink
|
||||||
|
COPY Cargo.toml Cargo.lock ./
|
||||||
|
COPY crates/ ./crates/
|
||||||
|
COPY apps/ ./apps/
|
||||||
|
|
||||||
|
RUN --mount=type=cache,target=${CARGO_HOME}/registry \
|
||||||
|
--mount=type=cache,target=${CARGO_HOME}/git \
|
||||||
|
--mount=type=cache,target=/scratch/nestrisink/target \
|
||||||
|
cargo build -p nestri-gst --release \
|
||||||
|
&& mkdir -p "${ARTIFACTS}/usr/lib/gstreamer-1.0" \
|
||||||
|
&& cp target/release/libgstnestri.so \
|
||||||
|
"${ARTIFACTS}/usr/lib/gstreamer-1.0/"
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# muvm-build
|
||||||
|
#******************************************************************************
|
||||||
|
# Build muvm binary (depends on libkrun + virgl packages).
|
||||||
|
FROM rust-builder AS muvm-build
|
||||||
|
|
||||||
|
# Install custom-built packages that muvm links against
|
||||||
|
WORKDIR /scratch
|
||||||
|
COPY --from=libkrunfw-build /artifacts/*.zst pkgs/
|
||||||
|
COPY --from=libkrun-build /artifacts/*.zst pkgs/
|
||||||
|
COPY --from=virgl-build /artifacts/*.zst pkgs/
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -S --noconfirm --needed pipewire \
|
||||||
|
&& pacman -U --noconfirm pkgs/*.zst \
|
||||||
|
&& rm -rf pkgs
|
||||||
|
|
||||||
|
WORKDIR /scratch/muvm
|
||||||
|
COPY Cargo.toml Cargo.lock ./
|
||||||
|
COPY crates/ ./crates/
|
||||||
|
COPY apps/ ./apps/
|
||||||
|
COPY share/ ./share/
|
||||||
|
|
||||||
|
RUN --mount=type=cache,target=${CARGO_HOME}/registry \
|
||||||
|
--mount=type=cache,target=${CARGO_HOME}/git \
|
||||||
|
--mount=type=cache,target=/scratch/muvm/target \
|
||||||
|
cargo build -p muvm --release \
|
||||||
|
&& install -Dm755 target/release/muvm "${ARTIFACTS}/usr/bin/muvm" \
|
||||||
|
&& install -Dm755 target/release/muvm-guest "${ARTIFACTS}/usr/bin/muvm-guest"
|
||||||
|
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# runner
|
||||||
|
#******************************************************************************
|
||||||
|
# The final runtime image – kept as simple as possible.
|
||||||
|
FROM initial AS runner
|
||||||
|
|
||||||
|
# ---- Enable multilib for 32-bit packages ----
|
||||||
|
RUN echo -e "\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
|
||||||
|
|
||||||
|
# ---- Collect and install custom-built .zst packages ----
|
||||||
|
COPY --from=mesa-build /artifacts/*.zst /tmp/pkgs/
|
||||||
|
COPY --from=lib32-mesa-build /artifacts/*.zst /tmp/pkgs/
|
||||||
|
COPY --from=libkrunfw-build /artifacts/*.zst /tmp/pkgs/
|
||||||
|
COPY --from=libkrun-build /artifacts/*.zst /tmp/pkgs/
|
||||||
|
COPY --from=virgl-build /artifacts/*.zst /tmp/pkgs/
|
||||||
|
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -Syu --noconfirm \
|
||||||
|
&& pacman -U --noconfirm /tmp/pkgs/*.zst \
|
||||||
|
&& rm -rf /tmp/pkgs
|
||||||
|
|
||||||
|
# ---- System runtime packages (single transaction for consistency) ----
|
||||||
|
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman/pkg \
|
||||||
|
pacman -S --noconfirm \
|
||||||
|
# Core
|
||||||
|
base systemd sudo bash \
|
||||||
|
# Steam & Gaming
|
||||||
|
steam gamescope mangohud seatd \
|
||||||
|
# Vulkan / Mesa / VA-API
|
||||||
|
vulkan-icd-loader vulkan-tools lib32-vulkan-icd-loader \
|
||||||
|
libva-mesa-driver libva-utils \
|
||||||
|
# Wayland / X
|
||||||
|
wayland libdrm libxkbcommon \
|
||||||
|
xorg-xwayland xwayland-satellite \
|
||||||
|
libinput \
|
||||||
|
# Audio
|
||||||
|
pipewire pipewire-pulse pipewire-alsa wireplumber \
|
||||||
|
lib32-libpulse \
|
||||||
|
# GStreamer runtime plugins
|
||||||
|
gstreamer gst-plugins-base \
|
||||||
|
gst-plugins-good gst-plugins-bad \
|
||||||
|
gst-plugin-isobmff gst-plugin-va \
|
||||||
|
gst-plugin-pipewire gst-plugin-qsv \
|
||||||
|
# Video acceleration
|
||||||
|
vpl-gpu-rt \
|
||||||
|
# GUI / Fonts
|
||||||
|
gtk3 lib32-gtk3 \
|
||||||
|
ttf-liberation noto-fonts-cjk \
|
||||||
|
# Networking & System
|
||||||
|
dbus curl passt openssh hwdata \
|
||||||
|
jq pacman-contrib lib32-libvdpau
|
||||||
|
|
||||||
|
# ---- Copy artifacts from Rust build stages ----
|
||||||
|
COPY --from=wl-proxy-build /artifacts/usr/ /usr/
|
||||||
|
COPY --from=gst-wayland-build /artifacts/usr/ /usr/
|
||||||
|
COPY --from=nestrisink-build /artifacts/usr/ /usr/
|
||||||
|
COPY --from=muvm-build /artifacts/usr/ /usr/
|
||||||
|
|
||||||
|
# ---- muvm-guest multi-call symlinks ----
|
||||||
|
RUN mkdir -p /opt/bin \
|
||||||
|
&& ln -sf /usr/bin/muvm-guest /opt/bin/muvm-remote \
|
||||||
|
&& ln -sf /usr/bin/muvm-guest /opt/bin/muvm-configure-network \
|
||||||
|
&& ln -sf /usr/bin/muvm-guest /opt/bin/muvm-pwbridge
|
||||||
|
|
||||||
|
# ---- User setup ----
|
||||||
|
ARG NESTRI_USER_PWD=""
|
||||||
|
ENV NESTRI_USER="nestri" \
|
||||||
|
NESTRI_UID=1000 \
|
||||||
|
NESTRI_GID=1000 \
|
||||||
|
NESTRI_LANG=en_US.UTF-8 \
|
||||||
|
NESTRI_XDG_RUNTIME_DIR=/run/user/1000 \
|
||||||
|
NESTRI_HOME=/home/nestri \
|
||||||
|
NVIDIA_DRIVER_CAPABILITIES=all
|
||||||
|
|
||||||
|
RUN mkdir -p "/home/${NESTRI_USER}" \
|
||||||
|
&& groupadd -g "${NESTRI_GID}" "${NESTRI_USER}" \
|
||||||
|
&& useradd -d "/home/${NESTRI_USER}" \
|
||||||
|
-u "${NESTRI_UID}" -g "${NESTRI_GID}" \
|
||||||
|
-s /bin/bash "${NESTRI_USER}" \
|
||||||
|
&& echo "${NESTRI_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
|
||||||
|
&& NESTRI_USER_PWD="${NESTRI_USER_PWD:-$(openssl rand -base64 12)}" \
|
||||||
|
&& echo "Setting password for ${NESTRI_USER}" \
|
||||||
|
&& echo "${NESTRI_USER}:${NESTRI_USER_PWD}" | chpasswd \
|
||||||
|
&& mkdir -p "${NESTRI_XDG_RUNTIME_DIR}" \
|
||||||
|
&& chown "${NESTRI_USER}:${NESTRI_USER}" "${NESTRI_XDG_RUNTIME_DIR}" \
|
||||||
|
&& usermod -aG input,video,render,seat,wheel,systemd-journal "${NESTRI_USER}"
|
||||||
|
|
||||||
|
# ---- Wireplumber suspend disable ----
|
||||||
|
RUN mkdir -p /run/dbus \
|
||||||
|
&& sed -i -z \
|
||||||
|
-e 's/{[[:space:]]*name = node\/suspend-node\.lua,[[:space:]]*type = script\/lua[[:space:]]*provides = hooks\.node\.suspend[[:space:]]*}[[:space:]]*//g' \
|
||||||
|
-e '/wants = \[/{s/hooks\.node\.suspend\s*//; s/,\s*\]/]/}' \
|
||||||
|
/usr/share/wireplumber/wireplumber.conf
|
||||||
|
|
||||||
|
# ---- Audio & config directories ----
|
||||||
|
COPY etc/ /etc/
|
||||||
|
|
||||||
|
# ---- Steam config ----
|
||||||
|
RUN mkdir -p "${NESTRI_HOME}/.local/share/Steam/config"
|
||||||
|
COPY build/steam/config.vdf "${NESTRI_HOME}/.local/share/Steam/config/"
|
||||||
|
|
||||||
|
# ---- Mask noisy/broken services ----
|
||||||
|
RUN systemctl mask \
|
||||||
|
dm-event.socket \
|
||||||
|
systemd-firstboot.service \
|
||||||
|
systemd-homed.service \
|
||||||
|
systemd-hwdb-update.service \
|
||||||
|
systemd-network-generator.service \
|
||||||
|
systemd-networkd.service \
|
||||||
|
systemd-networkd-wait-online.service \
|
||||||
|
systemd-remount-fs.service \
|
||||||
|
systemd-resolved.service \
|
||||||
|
systemd-timesyncd.service \
|
||||||
|
systemd-userdbd.service \
|
||||||
|
getty@tty1.service \
|
||||||
|
serial-getty@.service
|
||||||
|
|
||||||
|
# ---- Systemd units ----
|
||||||
|
RUN systemctl enable dbus.service \
|
||||||
|
&& systemctl set-default microvm.target
|
||||||
|
|
||||||
|
# ---- Scripts (copied last – they change the most) ----
|
||||||
|
COPY build/usr/bin/ /usr/bin/
|
||||||
|
|
||||||
|
# ---- Smoke test ----
|
||||||
|
RUN command -v steam muvm muvm-guest wl-cross-domain-proxy \
|
||||||
|
nestri-entry nestri-init
|
||||||
|
|
||||||
|
# ---- Final cleanup ----
|
||||||
|
RUN rm -rf /tmp/*
|
||||||
26
build/etc/pipewire/pipewire.conf.d/nestri-loopback.conf
Normal file
26
build/etc/pipewire/pipewire.conf.d/nestri-loopback.conf
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
context.modules = [
|
||||||
|
{
|
||||||
|
name = libpipewire-module-loopback
|
||||||
|
args = {
|
||||||
|
node.description = "Nestri Audio"
|
||||||
|
capture.props = {
|
||||||
|
node.name = "nestri-sink"
|
||||||
|
media.class = "Audio/Sink"
|
||||||
|
media.type = "Audio"
|
||||||
|
audio.position = [FL FR]
|
||||||
|
node.always-process = true
|
||||||
|
session.suspend-timeout-seconds = 0
|
||||||
|
priority.session = 10000
|
||||||
|
priority.driver = 10000
|
||||||
|
}
|
||||||
|
playback.props = {
|
||||||
|
node.name = "nestri-source"
|
||||||
|
media.class = "Audio/Source"
|
||||||
|
media.type = "Audio"
|
||||||
|
audio.position = [FL FR]
|
||||||
|
node.always-process = true
|
||||||
|
session.suspend-timeout-seconds = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
4
build/etc/systemd/system/microvm.target
Normal file
4
build/etc/systemd/system/microvm.target
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Nestri microVM system
|
||||||
|
AllowIsolate=yes
|
||||||
|
Wants=systemd-journald.socket systemd-udevd.service dbus.socket
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../nestri-network.service
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../nestri-pipewire-pulse.socket
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../nestri-pwbridge.socket
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../nestri-remote.service
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../nestri-session-bus.socket
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../nestri-user-session.service
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../nestri-wayland-proxy.socket
|
||||||
14
build/etc/systemd/system/nestri-network.service
Normal file
14
build/etc/systemd/system/nestri-network.service
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Configure VM network via muvm
|
||||||
|
DefaultDependencies=no
|
||||||
|
Before=network.target
|
||||||
|
After=systemd-udevd.service
|
||||||
|
Wants=microvm.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/opt/bin/muvm-configure-network
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=microvm.target
|
||||||
15
build/etc/systemd/system/nestri-pipewire-pulse.service
Normal file
15
build/etc/systemd/system/nestri-pipewire-pulse.service
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=PipeWire PulseAudio compatibility daemon
|
||||||
|
Requires=nestri-pipewire-pulse.socket
|
||||||
|
After=nestri-pwbridge.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=exec
|
||||||
|
ExecStartPre=/bin/mkdir -p /run/vm-user/pulse
|
||||||
|
ExecStart=/usr/bin/pipewire-pulse
|
||||||
|
Environment=XDG_RUNTIME_DIR=/run/vm-user
|
||||||
|
Environment=PIPEWIRE_RUNTIME_DIR=/run/vm-user
|
||||||
|
User=nestri
|
||||||
|
Group=nestri
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=1
|
||||||
13
build/etc/systemd/system/nestri-pipewire-pulse.socket
Normal file
13
build/etc/systemd/system/nestri-pipewire-pulse.socket
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=PipeWire PulseAudio compatibility socket
|
||||||
|
PartOf=nestri-pipewire-pulse.service
|
||||||
|
After=nestri-pwbridge.socket nestri-user-session.service
|
||||||
|
Requires=nestri-pwbridge.socket nestri-user-session.service
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=/run/vm-user/pulse/native
|
||||||
|
SocketUser=nestri
|
||||||
|
SocketGroup=nestri
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=microvm.target
|
||||||
12
build/etc/systemd/system/nestri-procsys-rw.service
Normal file
12
build/etc/systemd/system/nestri-procsys-rw.service
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Make /proc/sys writable for muvm
|
||||||
|
DefaultDependencies=no
|
||||||
|
Before=systemd-sysctl.service systemd-tmpfiles-setup.service
|
||||||
|
After=local-fs-pre.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
# umount the ro bind mount; exit 0 so service succeeds
|
||||||
|
# even if there's nothing to unmount (defensive)
|
||||||
|
ExecStart=/bin/sh -c 'umount /proc/sys 2>/dev/null || true'
|
||||||
7
build/etc/systemd/system/nestri-pwbridge.service
Normal file
7
build/etc/systemd/system/nestri-pwbridge.service
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=PipeWire cross-domain proxy
|
||||||
|
Requires=nestri-pwbridge.socket
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=exec
|
||||||
|
ExecStart=/opt/bin/muvm-pwbridge
|
||||||
13
build/etc/systemd/system/nestri-pwbridge.socket
Normal file
13
build/etc/systemd/system/nestri-pwbridge.socket
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=PipeWire cross-domain proxy socket
|
||||||
|
PartOf=nestri-pwbridge.service
|
||||||
|
After=nestri-user-session.service
|
||||||
|
Requires=nestri-user-session.service
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=/run/vm-user/pipewire-0
|
||||||
|
SocketUser=nestri
|
||||||
|
SocketGroup=nestri
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=microvm.target
|
||||||
33
build/etc/systemd/system/nestri-remote.service
Normal file
33
build/etc/systemd/system/nestri-remote.service
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=microVM application runner
|
||||||
|
OnFailure=exit.target
|
||||||
|
OnSuccess=exit.target
|
||||||
|
Wants=sockets.target
|
||||||
|
After=sockets.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=exec
|
||||||
|
PassEnvironment=MUVM_REMOTE_CONFIG MESA_LOADER_DRIVER_OVERRIDE TERM VK_DRIVER_FILES
|
||||||
|
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/vm-user/dbus.sock
|
||||||
|
Environment=XDG_RUNTIME_DIR=/run/vm-user
|
||||||
|
Environment=WAYLAND_DISPLAY=wayland-1
|
||||||
|
Environment=XDG_SESSION_TYPE=wayland
|
||||||
|
Environment=PULSE_SERVER=unix:/run/vm-user/pulse/native
|
||||||
|
Environment=SDL_AUDIO_DRIVER=pipewire
|
||||||
|
Environment=MESA_LOADER_DRIVER_OVERRIDE=zink
|
||||||
|
Environment=GALLIUM_DRIVER=zink
|
||||||
|
Environment=XAUTHORITY=/run/vm-user/xauth
|
||||||
|
Environment=MANGOHUD_CONFIGFILE=/etc/nestri/configs/MangoHud/MangoHud.conf
|
||||||
|
#Environment=SDL_VIDEODRIVER=wayland
|
||||||
|
Environment=PATH=/usr/bin:/usr/sbin:/bin:/sbin
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
ExecStartPre=+/bin/chown nestri:nestri /run/vm-user
|
||||||
|
ExecStart=/opt/bin/muvm-remote
|
||||||
|
StandardOutput=tty
|
||||||
|
StandardInput=tty
|
||||||
|
StandardError=tty
|
||||||
|
TTYPath=/dev/hvc0
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=microvm.target
|
||||||
9
build/etc/systemd/system/nestri-session-bus.service
Normal file
9
build/etc/systemd/system/nestri-session-bus.service
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=D-Bus session bus
|
||||||
|
Requires=nestri-session-bus.socket
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=exec
|
||||||
|
ExecStart=/usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --syslog-only
|
||||||
|
User=nestri
|
||||||
|
Group=nestri
|
||||||
13
build/etc/systemd/system/nestri-session-bus.socket
Normal file
13
build/etc/systemd/system/nestri-session-bus.socket
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=D-Bus session bus socket
|
||||||
|
PartOf=nestri-session-bus.service
|
||||||
|
After=nestri-user-session.service
|
||||||
|
Requires=nestri-user-session.service
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=/run/vm-user/dbus.sock
|
||||||
|
SocketUser=nestri
|
||||||
|
SocketGroup=nestri
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=microvm.target
|
||||||
13
build/etc/systemd/system/nestri-user-session.service
Normal file
13
build/etc/systemd/system/nestri-user-session.service
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Prepare VM user runtime directory
|
||||||
|
DefaultDependencies=no
|
||||||
|
Before=nestri-wayland-proxy.socket nestri-pwbridge.socket nestri-session-bus.socket
|
||||||
|
After=local-fs.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/bin/bash -c 'mkdir -p /run/vm-user && chown 1000:1000 /run/vm-user && chmod 700 /run/vm-user'
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=microvm.target
|
||||||
12
build/etc/systemd/system/nestri-wayland-proxy.service
Normal file
12
build/etc/systemd/system/nestri-wayland-proxy.service
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Wayland cross-domain proxy
|
||||||
|
Requires=nestri-wayland-proxy.socket
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=exec
|
||||||
|
ExecStartPre=+/bin/chmod 0666 /dev/dri/card0 /dev/dri/renderD128
|
||||||
|
ExecStart=/usr/bin/wl-cross-domain-proxy --listen-fd
|
||||||
|
User=nestri
|
||||||
|
Group=nestri
|
||||||
|
StandardOutput=file:/tmp/wayland-proxy.log
|
||||||
|
StandardError=file:/tmp/wayland-proxy-err.log
|
||||||
14
build/etc/systemd/system/nestri-wayland-proxy.socket
Normal file
14
build/etc/systemd/system/nestri-wayland-proxy.socket
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Wayland cross-domain proxy socket
|
||||||
|
PartOf=nestri-wayland-proxy.service
|
||||||
|
After=nestri-user-session.service
|
||||||
|
Requires=nestri-user-session.service
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=/run/vm-user/wayland-1
|
||||||
|
SocketUser=nestri
|
||||||
|
SocketGroup=nestri
|
||||||
|
FileDescriptorName=wayland
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=microvm.target
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../nestri-procsys-rw.service
|
||||||
412
build/packages/lib32-mesa/PKGBUILD
Normal file
412
build/packages/lib32-mesa/PKGBUILD
Normal file
@@ -0,0 +1,412 @@
|
|||||||
|
pkgbase=lib32-mesa
|
||||||
|
pkgname=(
|
||||||
|
lib32-mesa
|
||||||
|
lib32-vulkan-intel
|
||||||
|
lib32-vulkan-nouveau
|
||||||
|
lib32-vulkan-radeon
|
||||||
|
lib32-vulkan-virtio
|
||||||
|
lib32-vulkan-mesa-layers
|
||||||
|
lib32-vulkan-mesa-implicit-layers
|
||||||
|
)
|
||||||
|
pkgver=26.1.0
|
||||||
|
_pkgver=${pkgver/[a-z]/-&}
|
||||||
|
pkgrel=1
|
||||||
|
epoch=1
|
||||||
|
pkgdesc="Open-source OpenGL drivers - 32-bit"
|
||||||
|
url="https://gitlab.freedesktop.org/mesa/mesa"
|
||||||
|
arch=(x86_64)
|
||||||
|
license=("MIT AND BSD-3-Clause AND SGI-B-2.0")
|
||||||
|
makedepends=(
|
||||||
|
lib32-clang
|
||||||
|
lib32-directx-headers
|
||||||
|
lib32-expat
|
||||||
|
lib32-gcc-libs
|
||||||
|
lib32-glibc
|
||||||
|
lib32-libdisplay-info
|
||||||
|
lib32-libdrm
|
||||||
|
lib32-libelf
|
||||||
|
lib32-libglvnd
|
||||||
|
lib32-libpng
|
||||||
|
lib32-libva
|
||||||
|
lib32-libx11
|
||||||
|
lib32-libxcb
|
||||||
|
lib32-libxext
|
||||||
|
lib32-libxml2
|
||||||
|
lib32-libxrandr
|
||||||
|
lib32-libxshmfence
|
||||||
|
lib32-libxxf86vm
|
||||||
|
lib32-llvm
|
||||||
|
lib32-llvm-libs
|
||||||
|
lib32-lm_sensors
|
||||||
|
lib32-rust-libs
|
||||||
|
lib32-spirv-llvm-translator
|
||||||
|
lib32-spirv-tools
|
||||||
|
lib32-systemd
|
||||||
|
lib32-vulkan-icd-loader
|
||||||
|
lib32-wayland
|
||||||
|
lib32-xcb-util-keysyms
|
||||||
|
lib32-zlib
|
||||||
|
lib32-zstd
|
||||||
|
|
||||||
|
# shared between mesa and lib32-mesa
|
||||||
|
cbindgen
|
||||||
|
clang
|
||||||
|
cmake
|
||||||
|
elfutils
|
||||||
|
glslang
|
||||||
|
libclc
|
||||||
|
meson
|
||||||
|
python-mako
|
||||||
|
python-packaging
|
||||||
|
python-ply
|
||||||
|
python-pycparser
|
||||||
|
python-yaml
|
||||||
|
rust-bindgen
|
||||||
|
wayland-protocols
|
||||||
|
xorgproto
|
||||||
|
)
|
||||||
|
options=(
|
||||||
|
# GCC 14 LTO causes segfault in LLVM under si_llvm_optimize_module
|
||||||
|
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
|
||||||
|
#
|
||||||
|
# In general, upstream considers LTO to be broken until explicit notice.
|
||||||
|
!lto
|
||||||
|
)
|
||||||
|
source=("${pkgname}::git+${url}.git#branch=main")
|
||||||
|
|
||||||
|
# Rust crates for NVK, used as Meson subprojects
|
||||||
|
declare -A _crates=(
|
||||||
|
bitflags 2.9.1
|
||||||
|
cfg-if 1.0.0
|
||||||
|
equivalent 1.0.1
|
||||||
|
errno 0.3.12
|
||||||
|
hashbrown 0.14.1
|
||||||
|
indexmap 2.2.6
|
||||||
|
libc 0.2.171
|
||||||
|
log 0.4.27
|
||||||
|
once_cell 1.8.0
|
||||||
|
paste 1.0.14
|
||||||
|
pest 2.8.0
|
||||||
|
pest_derive 2.8.0
|
||||||
|
pest_generator 2.8.0
|
||||||
|
pest_meta 2.8.0
|
||||||
|
proc-macro2 1.0.86
|
||||||
|
quote 1.0.35
|
||||||
|
remain 0.2.12
|
||||||
|
roxmltree 0.20.0
|
||||||
|
rustc-hash 2.1.1
|
||||||
|
rustix 1.1.2
|
||||||
|
syn 2.0.87
|
||||||
|
thiserror 2.0.11
|
||||||
|
thiserror-impl 2.0.11
|
||||||
|
ucd-trie 0.1.6
|
||||||
|
unicode-ident 1.0.12
|
||||||
|
windows-link 0.2.0
|
||||||
|
windows-sys 0.61.1
|
||||||
|
zerocopy 0.8.13
|
||||||
|
zerocopy-derive 0.8.13
|
||||||
|
)
|
||||||
|
|
||||||
|
# Used to generate the above table
|
||||||
|
_gencrates() {
|
||||||
|
grep '^source_url' subprojects/*-rs.wrap | \
|
||||||
|
sed -r 's|.*crates/([^/]+)/([0-9.]+)/download|\1 \2|' | \
|
||||||
|
column -t -S 2 | sed 's/^/ /'
|
||||||
|
}
|
||||||
|
|
||||||
|
for _crate in "${!_crates[@]}"; do
|
||||||
|
_ver="${_crates[$_crate]}"
|
||||||
|
source+=(
|
||||||
|
"$_crate-$_ver.tar.gz::https://crates.io/api/v1/crates/$_crate/$_ver/download"
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
|
# https://docs.mesa3d.org/relnotes.html
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd lib32-mesa
|
||||||
|
|
||||||
|
local src
|
||||||
|
for src in "${source[@]}"; do
|
||||||
|
src="${src%%::*}"
|
||||||
|
src="${src##*/}"
|
||||||
|
src="${src%.zst}"
|
||||||
|
[[ $src = *.patch ]] || continue
|
||||||
|
echo "Applying patch $src..."
|
||||||
|
patch -Np1 < "../$src"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
local meson_options=(
|
||||||
|
--cross-file lib32
|
||||||
|
-D amdgpu-virtio=true
|
||||||
|
-D intel-virtio-experimental=true
|
||||||
|
-D android-libbacktrace=disabled
|
||||||
|
-D b_ndebug=true
|
||||||
|
-D gallium-drivers=all
|
||||||
|
-D gallium-extra-hud=true
|
||||||
|
-D gallium-mediafoundation=disabled
|
||||||
|
-D gallium-rusticl-enable-drivers=asahi,freedreno,radeonsi
|
||||||
|
-D gallium-rusticl=true
|
||||||
|
-D gles1=disabled
|
||||||
|
-D html-docs=disabled
|
||||||
|
-D intel-rt=disabled
|
||||||
|
-D libunwind=disabled
|
||||||
|
-D microsoft-clc=disabled
|
||||||
|
-D sysprof=false
|
||||||
|
-D valgrind=disabled
|
||||||
|
-D video-codecs=all
|
||||||
|
-D vulkan-drivers=all
|
||||||
|
-D vulkan-layers=device-select,intel-nullhw,overlay,screenshot,anti-lag,vram-report-limit
|
||||||
|
-D vulkan-manifest-per-architecture=false
|
||||||
|
)
|
||||||
|
|
||||||
|
# Build only minimal debug info to reduce size
|
||||||
|
CFLAGS+=" -g1"
|
||||||
|
CXXFLAGS+=" -g1"
|
||||||
|
|
||||||
|
# Inject subproject packages
|
||||||
|
export MESON_PACKAGE_CACHE_DIR="$srcdir"
|
||||||
|
|
||||||
|
arch-meson lib32-mesa build "${meson_options[@]}"
|
||||||
|
meson compile -C build
|
||||||
|
}
|
||||||
|
|
||||||
|
_pick() {
|
||||||
|
local p="$1" f d; shift
|
||||||
|
for f; do
|
||||||
|
d="$srcdir/$p/${f#$pkgdir/}"
|
||||||
|
mkdir -p "$(dirname "$d")"
|
||||||
|
mv -v "$f" "$d"
|
||||||
|
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
package_lib32-mesa() {
|
||||||
|
depends=(
|
||||||
|
lib32-expat
|
||||||
|
lib32-gcc-libs
|
||||||
|
lib32-glibc
|
||||||
|
lib32-libdrm
|
||||||
|
lib32-libelf
|
||||||
|
lib32-libglvnd
|
||||||
|
lib32-libx11
|
||||||
|
lib32-libxcb
|
||||||
|
lib32-libxext
|
||||||
|
lib32-libxshmfence
|
||||||
|
lib32-libxxf86vm
|
||||||
|
lib32-llvm-libs
|
||||||
|
lib32-lm_sensors
|
||||||
|
lib32-spirv-tools
|
||||||
|
lib32-wayland
|
||||||
|
lib32-zlib
|
||||||
|
lib32-zstd
|
||||||
|
|
||||||
|
mesa
|
||||||
|
)
|
||||||
|
optdepends=("opengl-man-pages: for the OpenGL API man pages")
|
||||||
|
provides=(
|
||||||
|
"lib32-libva-mesa-driver=$epoch:$pkgver-$pkgrel"
|
||||||
|
"lib32-mesa-libgl=$epoch:$pkgver-$pkgrel"
|
||||||
|
lib32-libva-driver
|
||||||
|
lib32-opengl-driver
|
||||||
|
)
|
||||||
|
conflicts=(
|
||||||
|
'lib32-libva-mesa-driver<1:24.2.7-1'
|
||||||
|
'lib32-mesa-libgl<17.0.1-2'
|
||||||
|
)
|
||||||
|
replaces=(
|
||||||
|
'lib32-libva-mesa-driver<1:24.2.7-1'
|
||||||
|
'lib32-mesa-libgl<17.0.1-2'
|
||||||
|
)
|
||||||
|
|
||||||
|
meson install -C build --destdir "$pkgdir" --no-rebuild
|
||||||
|
|
||||||
|
(
|
||||||
|
local libdir=usr/lib32
|
||||||
|
|
||||||
|
cd "$pkgdir"
|
||||||
|
|
||||||
|
_pick vkintel $libdir/libvulkan_intel{,_hasvk}.so
|
||||||
|
|
||||||
|
_pick vknvidia $libdir/libvulkan_nouveau.so
|
||||||
|
|
||||||
|
_pick vkradeon $libdir/libvulkan_radeon.so
|
||||||
|
|
||||||
|
_pick vkvirtio $libdir/libvulkan_virtio.so
|
||||||
|
|
||||||
|
_pick vkdevice $libdir/libVkLayer_MESA_anti_lag.so
|
||||||
|
_pick vkdevice $libdir/libVkLayer_MESA_device_select.so
|
||||||
|
|
||||||
|
_pick vklayer $libdir/libVkLayer_*.so
|
||||||
|
|
||||||
|
rm -rv etc usr/{bin,include,share}
|
||||||
|
|
||||||
|
# indirect rendering
|
||||||
|
ln -sr $libdir/libGLX_{mesa,indirect}.so.0
|
||||||
|
)
|
||||||
|
|
||||||
|
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_lib32-vulkan-intel() {
|
||||||
|
pkgdesc="Open-source Vulkan driver for Intel GPUs - 32-bit"
|
||||||
|
depends=(
|
||||||
|
lib32-expat
|
||||||
|
lib32-gcc-libs
|
||||||
|
lib32-glibc
|
||||||
|
lib32-libdisplay-info
|
||||||
|
lib32-libdrm
|
||||||
|
lib32-libx11
|
||||||
|
lib32-libxcb
|
||||||
|
lib32-libxshmfence
|
||||||
|
lib32-spirv-tools
|
||||||
|
lib32-systemd
|
||||||
|
lib32-vulkan-icd-loader
|
||||||
|
lib32-vulkan-mesa-implicit-layers
|
||||||
|
lib32-wayland
|
||||||
|
lib32-xcb-util-keysyms
|
||||||
|
lib32-zlib
|
||||||
|
lib32-zstd
|
||||||
|
|
||||||
|
vulkan-intel
|
||||||
|
)
|
||||||
|
optdepends=("lib32-vulkan-mesa-layers: additional vulkan layers")
|
||||||
|
provides=(lib32-vulkan-driver)
|
||||||
|
|
||||||
|
mv vkintel/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_lib32-vulkan-nouveau() {
|
||||||
|
pkgdesc="Open-source Vulkan driver for Nvidia GPUs - 32-bit"
|
||||||
|
depends=(
|
||||||
|
lib32-expat
|
||||||
|
lib32-gcc-libs
|
||||||
|
lib32-glibc
|
||||||
|
lib32-libdisplay-info
|
||||||
|
lib32-libdrm
|
||||||
|
lib32-libx11
|
||||||
|
lib32-libxcb
|
||||||
|
lib32-libxshmfence
|
||||||
|
lib32-spirv-tools
|
||||||
|
lib32-systemd
|
||||||
|
lib32-vulkan-icd-loader
|
||||||
|
lib32-vulkan-mesa-implicit-layers
|
||||||
|
lib32-wayland
|
||||||
|
lib32-xcb-util-keysyms
|
||||||
|
lib32-zlib
|
||||||
|
lib32-zstd
|
||||||
|
|
||||||
|
vulkan-nouveau
|
||||||
|
)
|
||||||
|
optdepends=("lib32-vulkan-mesa-layers: additional vulkan layers")
|
||||||
|
provides=(lib32-vulkan-driver)
|
||||||
|
|
||||||
|
mv vknvidia/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_lib32-vulkan-radeon() {
|
||||||
|
pkgdesc="Open-source Vulkan driver for AMD GPUs - 32-bit"
|
||||||
|
depends=(
|
||||||
|
lib32-expat
|
||||||
|
lib32-gcc-libs
|
||||||
|
lib32-glibc
|
||||||
|
lib32-libdisplay-info
|
||||||
|
lib32-libdrm
|
||||||
|
lib32-libelf
|
||||||
|
lib32-libx11
|
||||||
|
lib32-libxcb
|
||||||
|
lib32-libxshmfence
|
||||||
|
lib32-llvm-libs
|
||||||
|
lib32-spirv-tools
|
||||||
|
lib32-systemd
|
||||||
|
lib32-vulkan-icd-loader
|
||||||
|
lib32-vulkan-mesa-implicit-layers
|
||||||
|
lib32-wayland
|
||||||
|
lib32-xcb-util-keysyms
|
||||||
|
lib32-zlib
|
||||||
|
lib32-zstd
|
||||||
|
|
||||||
|
vulkan-radeon
|
||||||
|
)
|
||||||
|
optdepends=("lib32-vulkan-mesa-layers: additional vulkan layers")
|
||||||
|
provides=(lib32-vulkan-driver)
|
||||||
|
replaces=('lib32-amdvlk<=2025.Q2.1-1')
|
||||||
|
|
||||||
|
mv vkradeon/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_lib32-vulkan-virtio() {
|
||||||
|
pkgdesc="Open-source Vulkan driver for Virtio-GPU (Venus) - 32-bit"
|
||||||
|
depends=(
|
||||||
|
lib32-expat
|
||||||
|
lib32-gcc-libs
|
||||||
|
lib32-glibc
|
||||||
|
lib32-libdisplay-info
|
||||||
|
lib32-libdrm
|
||||||
|
lib32-libx11
|
||||||
|
lib32-libxcb
|
||||||
|
lib32-libxshmfence
|
||||||
|
lib32-systemd
|
||||||
|
lib32-vulkan-icd-loader
|
||||||
|
lib32-vulkan-mesa-implicit-layers
|
||||||
|
lib32-wayland
|
||||||
|
lib32-xcb-util-keysyms
|
||||||
|
lib32-zlib
|
||||||
|
lib32-zstd
|
||||||
|
|
||||||
|
vulkan-virtio
|
||||||
|
)
|
||||||
|
optdepends=("lib32-vulkan-mesa-layers: additional vulkan layers")
|
||||||
|
provides=(lib32-vulkan-driver)
|
||||||
|
|
||||||
|
mv vkvirtio/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_lib32-vulkan-mesa-layers() {
|
||||||
|
pkgdesc="Mesa's explicit Vulkan layers - 32-bit"
|
||||||
|
depends=(
|
||||||
|
lib32-gcc-libs
|
||||||
|
lib32-glibc
|
||||||
|
lib32-libpng
|
||||||
|
|
||||||
|
vulkan-mesa-layers
|
||||||
|
)
|
||||||
|
conflicts=(lib32-vulkan-mesa-layer)
|
||||||
|
replaces=(lib32-vulkan-mesa-layer)
|
||||||
|
|
||||||
|
mv vklayer/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_lib32-vulkan-mesa-implicit-layers() {
|
||||||
|
pkgdesc="Mesa's implicit Vulkan layers - 32-bit"
|
||||||
|
depends=(
|
||||||
|
lib32-gcc-libs
|
||||||
|
lib32-glibc
|
||||||
|
lib32-libdrm
|
||||||
|
lib32-libxcb
|
||||||
|
lib32-wayland
|
||||||
|
|
||||||
|
vulkan-mesa-implicit-layers
|
||||||
|
)
|
||||||
|
conflicts=(lib32-vulkan-mesa-device-select)
|
||||||
|
replaces=(lib32-vulkan-mesa-device-select)
|
||||||
|
|
||||||
|
mv vkdevice/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim:set sw=2 sts=-1 et:
|
||||||
39
build/packages/libkrun/PKGBUILD
Normal file
39
build/packages/libkrun/PKGBUILD
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
pkgname=libkrun
|
||||||
|
pkgver=1.17.3.r0.gvalpackett
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="A dynamic library providing Virtualization-based process isolation capabilities (val/vluqsysxtqrk branch)"
|
||||||
|
url='https://github.com/valpackett/libkrun'
|
||||||
|
arch=('x86_64')
|
||||||
|
license=('Apache-2.0')
|
||||||
|
makedepends=('cargo' 'patchelf' 'clang' 'git')
|
||||||
|
depends=('glibc' 'gcc-libs' 'libkrunfw' 'pipewire' 'virglrenderer')
|
||||||
|
# Format: 'folder_name::git+url#branch=branch_name'
|
||||||
|
source=("${pkgname}::git+${url}.git#branch=val/vluqsysxtqrk")
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$pkgname"
|
||||||
|
# Generates a version string based on the latest tag and commit count
|
||||||
|
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$pkgname"
|
||||||
|
|
||||||
|
cargo fetch --locked --target "$(rustc --print host-tuple)"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$pkgname"
|
||||||
|
|
||||||
|
export ZSTD_SYS_USE_PKG_CONFIG=1
|
||||||
|
make BLK=1 NET=1 EFI=0 GPU=1 SND=1 INPUT=1 VERBOSE=1
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$pkgname"
|
||||||
|
|
||||||
|
make DESTDIR="$pkgdir" PREFIX=/usr LIBDIR_Linux=lib install
|
||||||
|
|
||||||
|
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||||
|
}
|
||||||
51
build/packages/libkrunfw/PKGBUILD
Normal file
51
build/packages/libkrunfw/PKGBUILD
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
pkgname=libkrunfw
|
||||||
|
_kver=6.12.68
|
||||||
|
pkgver=5.2.1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="A dynamic library bundling the guest payload consumed by libkrun (with 32-bit support)"
|
||||||
|
url="https://github.com/containers/libkrunfw"
|
||||||
|
arch=('x86_64')
|
||||||
|
license=('GPL-2.0-only' 'LGPL-2.1-only')
|
||||||
|
depends=('glibc')
|
||||||
|
makedepends=('bc' 'python-pyelftools' 'cpio')
|
||||||
|
source=("https://github.com/containers/libkrunfw/archive/refs/tags/v$pkgver/$pkgname-$pkgver.tar.gz"
|
||||||
|
"https://cdn.kernel.org/pub/linux/kernel/v${_kver%%.*}.x/linux-${_kver}.tar.xz")
|
||||||
|
noextract=("linux-${_kver}.tar.xz")
|
||||||
|
options=(!debug)
|
||||||
|
sha256sums=('c7eebd7149b15e4d74d2dff9acd3137dc13eedf604adf1df2efa52d9f36fe0bb'
|
||||||
|
'd367c7504bd4da520dd01eb08125d2d0ac088bc8af4cd56d236f2074dd4225b7')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
|
||||||
|
mkdir -p tarballs
|
||||||
|
cp -s "$srcdir/linux-${_kver}.tar.xz" tarballs/
|
||||||
|
|
||||||
|
_config="config-libkrunfw_x86_64"
|
||||||
|
|
||||||
|
# Enable IA32 (32-bit) emulation support
|
||||||
|
sed -i 's/# CONFIG_IA32_EMULATION is not set/CONFIG_IA32_EMULATION=y/' "$_config"
|
||||||
|
|
||||||
|
# Enable modify_ldt syscall (needed by many 32-bit apps including Steam)
|
||||||
|
sed -i 's/# CONFIG_MODIFY_LDT_SYSCALL is not set/CONFIG_MODIFY_LDT_SYSCALL=y/' "$_config"
|
||||||
|
|
||||||
|
# Enable 32-bit time compatibility
|
||||||
|
sed -i 's/# CONFIG_COMPAT_32BIT_TIME is not set/CONFIG_COMPAT_32BIT_TIME=y/' "$_config"
|
||||||
|
|
||||||
|
# Enable x32 ABI
|
||||||
|
sed -i 's/# CONFIG_X86_X32_ABI is not set/CONFIG_X86_X32_ABI=y/' "$_config"
|
||||||
|
|
||||||
|
# Increase max CPU count (default 16 is low for gaming)
|
||||||
|
sed -i 's/CONFIG_NR_CPUS=16/CONFIG_NR_CPUS=128/' "$_config"
|
||||||
|
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
|
||||||
|
make DESTDIR="$pkgdir" PREFIX=/usr LIBDIR_Linux=lib install
|
||||||
|
|
||||||
|
install -Dm644 LICENSE-GPL-2.0-only "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-GPL-2.0-only
|
||||||
|
install -Dm644 LICENSE-LGPL-2.1-only "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-LGPL-2.1-only
|
||||||
|
}
|
||||||
418
build/packages/mesa/PKGBUILD
Normal file
418
build/packages/mesa/PKGBUILD
Normal file
@@ -0,0 +1,418 @@
|
|||||||
|
pkgbase=mesa
|
||||||
|
pkgname=(
|
||||||
|
mesa
|
||||||
|
vulkan-intel
|
||||||
|
vulkan-nouveau
|
||||||
|
vulkan-radeon
|
||||||
|
vulkan-virtio
|
||||||
|
vulkan-mesa-layers
|
||||||
|
vulkan-mesa-implicit-layers
|
||||||
|
)
|
||||||
|
pkgver=26.1.0
|
||||||
|
_pkgver=${pkgver/[a-z]/-&}
|
||||||
|
pkgrel=1
|
||||||
|
epoch=1
|
||||||
|
pkgdesc="Open-source OpenGL drivers"
|
||||||
|
url="https://gitlab.freedesktop.org/mesa/mesa"
|
||||||
|
arch=(x86_64)
|
||||||
|
license=("MIT AND BSD-3-Clause AND SGI-B-2.0")
|
||||||
|
makedepends=(
|
||||||
|
clang
|
||||||
|
directx-headers
|
||||||
|
expat
|
||||||
|
glibc
|
||||||
|
libdisplay-info
|
||||||
|
libdrm
|
||||||
|
libelf
|
||||||
|
libgcc
|
||||||
|
libglvnd
|
||||||
|
libpng
|
||||||
|
libstdc++
|
||||||
|
libva
|
||||||
|
libx11
|
||||||
|
libxcb
|
||||||
|
libxext
|
||||||
|
libxml2
|
||||||
|
libxrandr
|
||||||
|
libxshmfence
|
||||||
|
libxxf86vm
|
||||||
|
llvm
|
||||||
|
llvm-libs
|
||||||
|
lm_sensors
|
||||||
|
rust
|
||||||
|
spirv-llvm-translator
|
||||||
|
spirv-tools
|
||||||
|
systemd-libs
|
||||||
|
vulkan-icd-loader
|
||||||
|
wayland
|
||||||
|
xcb-util-keysyms
|
||||||
|
zlib
|
||||||
|
zstd
|
||||||
|
|
||||||
|
# shared between mesa and lib32-mesa
|
||||||
|
cbindgen
|
||||||
|
clang
|
||||||
|
cmake
|
||||||
|
elfutils
|
||||||
|
glslang
|
||||||
|
libclc
|
||||||
|
meson
|
||||||
|
python-mako
|
||||||
|
python-packaging
|
||||||
|
python-ply
|
||||||
|
python-pycparser
|
||||||
|
python-yaml
|
||||||
|
rust-bindgen
|
||||||
|
wayland-protocols
|
||||||
|
xorgproto
|
||||||
|
|
||||||
|
# mesa-only deps
|
||||||
|
libsysprof-capture
|
||||||
|
valgrind
|
||||||
|
|
||||||
|
# html-docs
|
||||||
|
python-sphinx
|
||||||
|
python-sphinx-hawkmoth
|
||||||
|
)
|
||||||
|
options=(
|
||||||
|
# GCC 14 LTO causes segfault in LLVM under si_llvm_optimize_module
|
||||||
|
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
|
||||||
|
#
|
||||||
|
# In general, upstream considers LTO to be broken until explicit notice.
|
||||||
|
!lto
|
||||||
|
)
|
||||||
|
source=("${pkgname}::git+${url}.git#branch=main")
|
||||||
|
|
||||||
|
# Rust crates for NVK, used as Meson subprojects
|
||||||
|
declare -A _crates=(
|
||||||
|
bitflags 2.9.1
|
||||||
|
cfg-if 1.0.0
|
||||||
|
equivalent 1.0.1
|
||||||
|
errno 0.3.12
|
||||||
|
hashbrown 0.14.1
|
||||||
|
indexmap 2.2.6
|
||||||
|
libc 0.2.171
|
||||||
|
log 0.4.27
|
||||||
|
once_cell 1.8.0
|
||||||
|
paste 1.0.14
|
||||||
|
pest 2.8.0
|
||||||
|
pest_derive 2.8.0
|
||||||
|
pest_generator 2.8.0
|
||||||
|
pest_meta 2.8.0
|
||||||
|
proc-macro2 1.0.86
|
||||||
|
quote 1.0.35
|
||||||
|
remain 0.2.12
|
||||||
|
roxmltree 0.20.0
|
||||||
|
rustc-hash 2.1.1
|
||||||
|
rustix 1.1.2
|
||||||
|
syn 2.0.87
|
||||||
|
thiserror 2.0.11
|
||||||
|
thiserror-impl 2.0.11
|
||||||
|
ucd-trie 0.1.6
|
||||||
|
unicode-ident 1.0.12
|
||||||
|
windows-link 0.2.0
|
||||||
|
windows-sys 0.61.1
|
||||||
|
zerocopy 0.8.13
|
||||||
|
zerocopy-derive 0.8.13
|
||||||
|
)
|
||||||
|
|
||||||
|
# Used to generate the above table
|
||||||
|
_gencrates() {
|
||||||
|
grep '^source_url' subprojects/*-rs.wrap | \
|
||||||
|
sed -r 's|.*crates/([^/]+)/([0-9.]+)/download|\1 \2|' | \
|
||||||
|
column -t -S 2 | sed 's/^/ /'
|
||||||
|
}
|
||||||
|
|
||||||
|
for _crate in "${!_crates[@]}"; do
|
||||||
|
_ver="${_crates[$_crate]}"
|
||||||
|
source+=(
|
||||||
|
"$_crate-$_ver.tar.gz::https://crates.io/api/v1/crates/$_crate/$_ver/download"
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
|
# https://docs.mesa3d.org/relnotes.html
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd mesa
|
||||||
|
|
||||||
|
local src
|
||||||
|
for src in "${source[@]}"; do
|
||||||
|
src="${src%%::*}"
|
||||||
|
src="${src##*/}"
|
||||||
|
src="${src%.zst}"
|
||||||
|
[[ $src = *.patch ]] || continue
|
||||||
|
echo "Applying patch $src..."
|
||||||
|
patch -Np1 < "../$src"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
local meson_options=(
|
||||||
|
-D amdgpu-virtio=true
|
||||||
|
-D intel-virtio-experimental=true
|
||||||
|
-D android-libbacktrace=disabled
|
||||||
|
-D b_ndebug=true
|
||||||
|
-D gallium-drivers=all
|
||||||
|
-D gallium-extra-hud=true
|
||||||
|
-D gallium-mediafoundation=disabled
|
||||||
|
-D gallium-rusticl-enable-drivers=asahi,freedreno,radeonsi
|
||||||
|
-D gallium-rusticl=true
|
||||||
|
-D gles1=disabled
|
||||||
|
-D html-docs=enabled
|
||||||
|
-D intel-rt=enabled
|
||||||
|
-D libunwind=disabled
|
||||||
|
-D microsoft-clc=disabled
|
||||||
|
-D sysprof=true
|
||||||
|
-D valgrind=enabled
|
||||||
|
-D video-codecs=all
|
||||||
|
-D vulkan-drivers=all
|
||||||
|
-D vulkan-layers=device-select,intel-nullhw,overlay,screenshot,anti-lag,vram-report-limit
|
||||||
|
-D vulkan-manifest-per-architecture=false
|
||||||
|
)
|
||||||
|
|
||||||
|
# Build only minimal debug info to reduce size
|
||||||
|
CFLAGS+=" -g1"
|
||||||
|
CXXFLAGS+=" -g1"
|
||||||
|
|
||||||
|
# Inject subproject packages
|
||||||
|
export MESON_PACKAGE_CACHE_DIR="$srcdir"
|
||||||
|
|
||||||
|
arch-meson mesa build "${meson_options[@]}"
|
||||||
|
meson compile -C build
|
||||||
|
}
|
||||||
|
|
||||||
|
_pick() {
|
||||||
|
local p="$1" f d; shift
|
||||||
|
for f; do
|
||||||
|
d="$srcdir/$p/${f#$pkgdir/}"
|
||||||
|
mkdir -p "$(dirname "$d")"
|
||||||
|
mv -v "$f" "$d"
|
||||||
|
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
package_mesa() {
|
||||||
|
depends=(
|
||||||
|
expat
|
||||||
|
glibc
|
||||||
|
libdrm
|
||||||
|
libelf
|
||||||
|
libgcc
|
||||||
|
libglvnd
|
||||||
|
libstdc++
|
||||||
|
libx11
|
||||||
|
libxcb
|
||||||
|
libxext
|
||||||
|
libxshmfence
|
||||||
|
libxxf86vm
|
||||||
|
llvm-libs
|
||||||
|
lm_sensors
|
||||||
|
spirv-tools
|
||||||
|
wayland
|
||||||
|
zlib
|
||||||
|
zstd
|
||||||
|
)
|
||||||
|
optdepends=("opengl-man-pages: for the OpenGL API man pages")
|
||||||
|
provides=(
|
||||||
|
"libva-mesa-driver=$epoch:$pkgver-$pkgrel"
|
||||||
|
"mesa-libgl=$epoch:$pkgver-$pkgrel"
|
||||||
|
libva-driver
|
||||||
|
opengl-driver
|
||||||
|
)
|
||||||
|
conflicts=(
|
||||||
|
'libva-mesa-driver<1:24.2.7-1'
|
||||||
|
'mesa-libgl<17.0.1-2'
|
||||||
|
)
|
||||||
|
replaces=(
|
||||||
|
'libva-mesa-driver<1:24.2.7-1'
|
||||||
|
'mesa-libgl<17.0.1-2'
|
||||||
|
)
|
||||||
|
|
||||||
|
meson install -C build --destdir "$pkgdir" --no-rebuild
|
||||||
|
|
||||||
|
(
|
||||||
|
local libdir=usr/lib
|
||||||
|
|
||||||
|
cd "$pkgdir"
|
||||||
|
|
||||||
|
_pick vkintel $libdir/libvulkan_intel{,_hasvk}.so
|
||||||
|
_pick vkintel usr/share/vulkan/icd.d/intel{,_hasvk}_icd.json
|
||||||
|
|
||||||
|
_pick vknvidia $libdir/libvulkan_nouveau.so
|
||||||
|
_pick vknvidia usr/share/vulkan/icd.d/nouveau_icd.json
|
||||||
|
|
||||||
|
_pick vkradeon $libdir/libvulkan_radeon.so
|
||||||
|
_pick vkradeon usr/share/drirc.d/00-radv-defaults.conf
|
||||||
|
_pick vkradeon usr/share/vulkan/icd.d/radeon_icd.json
|
||||||
|
|
||||||
|
_pick vkvirtio $libdir/libvulkan_virtio.so
|
||||||
|
_pick vkvirtio usr/share/vulkan/icd.d/virtio_icd.json
|
||||||
|
|
||||||
|
_pick vkdevice $libdir/libVkLayer_MESA_anti_lag.so
|
||||||
|
_pick vkdevice $libdir/libVkLayer_MESA_device_select.so
|
||||||
|
_pick vkdevice usr/share/vulkan/implicit_layer.d
|
||||||
|
|
||||||
|
_pick vklayer $libdir/libVkLayer_*.so
|
||||||
|
_pick vklayer usr/bin/mesa-*-control.py
|
||||||
|
_pick vklayer usr/share/vulkan/explicit_layer.d
|
||||||
|
|
||||||
|
# indirect rendering
|
||||||
|
ln -sr $libdir/libGLX_{mesa,indirect}.so.0
|
||||||
|
)
|
||||||
|
|
||||||
|
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_vulkan-intel() {
|
||||||
|
pkgdesc="Open-source Vulkan driver for Intel GPUs"
|
||||||
|
depends=(
|
||||||
|
expat
|
||||||
|
glibc
|
||||||
|
libdisplay-info
|
||||||
|
libdrm
|
||||||
|
libgcc
|
||||||
|
libstdc++
|
||||||
|
libx11
|
||||||
|
libxcb
|
||||||
|
libxshmfence
|
||||||
|
spirv-tools
|
||||||
|
systemd-libs
|
||||||
|
vulkan-icd-loader
|
||||||
|
vulkan-mesa-implicit-layers
|
||||||
|
wayland
|
||||||
|
xcb-util-keysyms
|
||||||
|
zlib
|
||||||
|
zstd
|
||||||
|
)
|
||||||
|
optdepends=("vulkan-mesa-layers: additional vulkan layers")
|
||||||
|
provides=(vulkan-driver)
|
||||||
|
|
||||||
|
mv vkintel/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_vulkan-nouveau() {
|
||||||
|
pkgdesc="Open-source Vulkan driver for Nvidia GPUs"
|
||||||
|
depends=(
|
||||||
|
expat
|
||||||
|
glibc
|
||||||
|
libdisplay-info
|
||||||
|
libdrm
|
||||||
|
libgcc
|
||||||
|
libstdc++
|
||||||
|
libx11
|
||||||
|
libxcb
|
||||||
|
libxshmfence
|
||||||
|
spirv-tools
|
||||||
|
systemd-libs
|
||||||
|
vulkan-icd-loader
|
||||||
|
vulkan-mesa-implicit-layers
|
||||||
|
wayland
|
||||||
|
xcb-util-keysyms
|
||||||
|
zlib
|
||||||
|
zstd
|
||||||
|
)
|
||||||
|
optdepends=("vulkan-mesa-layers: additional vulkan layers")
|
||||||
|
provides=(vulkan-driver)
|
||||||
|
|
||||||
|
mv vknvidia/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_vulkan-radeon() {
|
||||||
|
pkgdesc="Open-source Vulkan driver for AMD GPUs"
|
||||||
|
depends=(
|
||||||
|
expat
|
||||||
|
glibc
|
||||||
|
libdisplay-info
|
||||||
|
libdrm
|
||||||
|
libelf
|
||||||
|
libgcc
|
||||||
|
libstdc++
|
||||||
|
libx11
|
||||||
|
libxcb
|
||||||
|
libxshmfence
|
||||||
|
llvm-libs
|
||||||
|
spirv-tools
|
||||||
|
systemd-libs
|
||||||
|
vulkan-icd-loader
|
||||||
|
vulkan-mesa-implicit-layers
|
||||||
|
wayland
|
||||||
|
xcb-util-keysyms
|
||||||
|
zlib
|
||||||
|
zstd
|
||||||
|
)
|
||||||
|
optdepends=("vulkan-mesa-layers: additional vulkan layers")
|
||||||
|
provides=(vulkan-driver)
|
||||||
|
replaces=('amdvlk<=2025.Q2.1-1')
|
||||||
|
|
||||||
|
mv vkradeon/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_vulkan-virtio() {
|
||||||
|
pkgdesc="Open-source Vulkan driver for Virtio-GPU (Venus)"
|
||||||
|
depends=(
|
||||||
|
expat
|
||||||
|
glibc
|
||||||
|
libdisplay-info
|
||||||
|
libdrm
|
||||||
|
libgcc
|
||||||
|
libx11
|
||||||
|
libxcb
|
||||||
|
libxshmfence
|
||||||
|
systemd-libs
|
||||||
|
vulkan-icd-loader
|
||||||
|
vulkan-mesa-implicit-layers
|
||||||
|
wayland
|
||||||
|
xcb-util-keysyms
|
||||||
|
zlib
|
||||||
|
zstd
|
||||||
|
)
|
||||||
|
optdepends=("vulkan-mesa-layers: additional vulkan layers")
|
||||||
|
provides=(vulkan-driver)
|
||||||
|
|
||||||
|
mv vkvirtio/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_vulkan-mesa-layers() {
|
||||||
|
pkgdesc="Mesa's explicit Vulkan layers"
|
||||||
|
depends=(
|
||||||
|
glibc
|
||||||
|
libgcc
|
||||||
|
libpng
|
||||||
|
libstdc++
|
||||||
|
|
||||||
|
python
|
||||||
|
)
|
||||||
|
conflicts=(vulkan-mesa-layer)
|
||||||
|
replaces=(vulkan-mesa-layer)
|
||||||
|
|
||||||
|
mv vklayer/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package_vulkan-mesa-implicit-layers() {
|
||||||
|
pkgdesc="Mesa's implicit Vulkan layers"
|
||||||
|
depends=(
|
||||||
|
glibc
|
||||||
|
libdrm
|
||||||
|
libxcb
|
||||||
|
wayland
|
||||||
|
)
|
||||||
|
conflicts=(vulkan-mesa-device-select)
|
||||||
|
replaces=(vulkan-mesa-device-select)
|
||||||
|
|
||||||
|
mv vkdevice/* "$pkgdir"
|
||||||
|
|
||||||
|
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim:set sw=2 sts=-1 et:
|
||||||
28
build/packages/virglrenderer/PKGBUILD
Normal file
28
build/packages/virglrenderer/PKGBUILD
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
pkgname=virglrenderer
|
||||||
|
pkgver=1.3.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='A virtual 3D GPU library, that allows the guest operating system to use the host GPU to accelerate 3D rendering'
|
||||||
|
arch=(x86_64)
|
||||||
|
url='https://virgil3d.github.io/'
|
||||||
|
license=(MIT)
|
||||||
|
depends=(libepoxy mesa libva vulkan-icd-loader)
|
||||||
|
makedepends=(python meson ninja vulkan-headers python-yaml)
|
||||||
|
checkdepends=(check)
|
||||||
|
_tag=virglrenderer-$pkgver
|
||||||
|
source=(virglrenderer-$pkgver.tar.bz2::https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/$_tag/virglrenderer-$_tag.tar.bz2)
|
||||||
|
sha256sums=('47a64189492a754685a430c713ac6700f4b1c3e7b871e87889ddb96e4d65e8ab')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd virglrenderer-$_tag
|
||||||
|
meson --prefix=/usr --libexecdir=lib/$pkgname build \
|
||||||
|
-Dvideo=true \
|
||||||
|
-Dvenus=true \
|
||||||
|
-Ddrm-renderers=amdgpu-experimental,i915-experimental
|
||||||
|
ninja -C build
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd virglrenderer-$_tag
|
||||||
|
DESTDIR="$pkgdir" ninja -C build install
|
||||||
|
install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
|
||||||
|
}
|
||||||
576
build/usr/bin/nestri-entry
Normal file
576
build/usr/bin/nestri-entry
Normal file
@@ -0,0 +1,576 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# nestri-entry
|
||||||
|
#
|
||||||
|
# Entry point that runs inside the bwrap sandbox.
|
||||||
|
# Launched by nestri-runner.sh as the top-level process.
|
||||||
|
#
|
||||||
|
# Responsibilities:
|
||||||
|
# 1. Start PipeWire (sandbox-local audio server)
|
||||||
|
# 2. Start GStreamer pipeline (Wayland compositor + encoding + streaming)
|
||||||
|
# 3. Launch muvm (microVM that runs the actual games)
|
||||||
|
#
|
||||||
|
# The GStreamer pipeline IS the Wayland compositor:
|
||||||
|
# - waylanddisplaysrc creates $XDG_RUNTIME_DIR/wayland-1
|
||||||
|
# - VM guest connects via wl-cross-domain-proxy (virtio-gpu)
|
||||||
|
# - Video frames captured as DMA-BUF, encoded, streamed via QUIC
|
||||||
|
# - Audio captured from PipeWire, encoded as Opus, muxed with video
|
||||||
|
#
|
||||||
|
# Environment variables (set by nestri-runner.sh):
|
||||||
|
# NESTRI_WIDTH Stream width (default: 1920)
|
||||||
|
# NESTRI_HEIGHT Stream height (default: 1080)
|
||||||
|
# NESTRI_FPS Stream framerate (default: 60)
|
||||||
|
# NESTRI_BITRATE Encoder bitrate in kbps (default: 8000)
|
||||||
|
# NESTRI_RENDER_NODE GPU render node (default: /dev/dri/renderD128)
|
||||||
|
# NESTRI_BROADCAST Stream broadcast name (default: live)
|
||||||
|
# NESTRI_GPU GPU type: amd, intel, nvidia (default: amd)
|
||||||
|
# NESTRI_CODEC Video codec: h264, h265, av1 (default: h264)
|
||||||
|
# MICROVM_UID User ID inside sandbox/VM
|
||||||
|
# MICROVM_GID Group ID inside sandbox/VM
|
||||||
|
#
|
||||||
|
# muvm-guest binary symlinks (in /opt/bin/):
|
||||||
|
# muvm-remote — session runner (runs user command)
|
||||||
|
# muvm-configure-network — network setup for VM
|
||||||
|
# muvm-pwbridge — PipeWire bridge (host ↔ guest audio)
|
||||||
|
# ============================================================
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# Configuration (from environment or defaults)
|
||||||
|
# ============================================================
|
||||||
|
|
||||||
|
NESTRI_WIDTH="${NESTRI_WIDTH:-1920}"
|
||||||
|
NESTRI_HEIGHT="${NESTRI_HEIGHT:-1080}"
|
||||||
|
NESTRI_FPS="${NESTRI_FPS:-60}"
|
||||||
|
NESTRI_BITRATE="${NESTRI_BITRATE:-8000}"
|
||||||
|
NESTRI_RENDER_NODE="${NESTRI_RENDER_NODE:-/dev/dri/renderD128}"
|
||||||
|
NESTRI_BROADCAST="${NESTRI_BROADCAST:-live}"
|
||||||
|
MICROVM_UID="${MICROVM_UID:-1000}"
|
||||||
|
|
||||||
|
# GPU and codec selection
|
||||||
|
# GPU options: amd, intel, nvidia
|
||||||
|
# Codec options: h264, h265, av1
|
||||||
|
NESTRI_GPU="${NESTRI_GPU:-amd}"
|
||||||
|
NESTRI_CODEC="${NESTRI_CODEC:-h264}"
|
||||||
|
|
||||||
|
# Setup XDG_RUNTIME_DIR
|
||||||
|
mkdir -p "$XDG_RUNTIME_DIR"
|
||||||
|
|
||||||
|
# Track background PIDs for cleanup
|
||||||
|
PIDS=()
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
echo "nestri-entry: shutting down..." >&2
|
||||||
|
|
||||||
|
# Kill all tracked background processes
|
||||||
|
for pid in "${PIDS[@]}"; do
|
||||||
|
if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; then
|
||||||
|
kill -TERM "$pid" 2>/dev/null
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Wait briefly for graceful shutdown
|
||||||
|
sleep 0.5
|
||||||
|
|
||||||
|
# Force kill anything still alive
|
||||||
|
for pid in "${PIDS[@]}"; do
|
||||||
|
if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; then
|
||||||
|
kill -KILL "$pid" 2>/dev/null
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# dbus-launch sets this separately
|
||||||
|
if [ -n "${DBUS_SESSION_BUS_PID:-}" ]; then
|
||||||
|
kill -TERM "$DBUS_SESSION_BUS_PID" 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
trap cleanup EXIT INT TERM
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 1. D-Bus Session Bus + PipeWire (sandbox-local audio)
|
||||||
|
#
|
||||||
|
# WirePlumber requires a D-Bus session bus — it's a hard
|
||||||
|
# dependency. PipeWire itself can start without D-Bus, but
|
||||||
|
# WirePlumber (the session manager that handles routing,
|
||||||
|
# device enumeration, policy) will abort without one.
|
||||||
|
#
|
||||||
|
# Inside the VM, systemd provides the session bus via
|
||||||
|
# nestri-session-bus.service. Here in bwrap, we have no
|
||||||
|
# systemd, so we launch dbus-daemon manually.
|
||||||
|
#
|
||||||
|
# Audio flow:
|
||||||
|
# Game (in VM) → PipeWire (guest) → muvm-pwbridge → PipeWire (here)
|
||||||
|
# PipeWire (here) → pipewiresrc → GStreamer → Opus encode → QUIC
|
||||||
|
# ============================================================
|
||||||
|
|
||||||
|
# --- D-Bus session bus ---
|
||||||
|
echo "nestri-entry: starting dbus session bus..." >&2
|
||||||
|
|
||||||
|
# Create dbus directory
|
||||||
|
mkdir -p "$XDG_RUNTIME_DIR/dbus"
|
||||||
|
|
||||||
|
# Launch a session bus and capture its address
|
||||||
|
eval "$(dbus-launch --sh-syntax)"
|
||||||
|
|
||||||
|
if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then
|
||||||
|
echo "nestri-entry: WARNING — dbus-launch failed, trying manual start..." >&2
|
||||||
|
|
||||||
|
DBUS_SOCKET="$XDG_RUNTIME_DIR/dbus/session-bus"
|
||||||
|
dbus-daemon \
|
||||||
|
--session \
|
||||||
|
--address="unix:path=$DBUS_SOCKET" \
|
||||||
|
--nofork \
|
||||||
|
--print-address \
|
||||||
|
&>/dev/null &
|
||||||
|
DBUS_PID=$!
|
||||||
|
PIDS+=($DBUS_PID)
|
||||||
|
|
||||||
|
# Wait for socket
|
||||||
|
for i in $(seq 1 30); do
|
||||||
|
[ -S "$DBUS_SOCKET" ] && break
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -S "$DBUS_SOCKET" ]; then
|
||||||
|
export DBUS_SESSION_BUS_ADDRESS="unix:path=$DBUS_SOCKET"
|
||||||
|
echo "nestri-entry: dbus ready at $DBUS_SOCKET" >&2
|
||||||
|
else
|
||||||
|
echo "nestri-entry: WARNING — dbus-daemon failed to start" >&2
|
||||||
|
echo "nestri-entry: wireplumber will likely fail" >&2
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# dbus-launch succeeded, track its PID for cleanup
|
||||||
|
PIDS+=("${DBUS_SESSION_BUS_PID:-}")
|
||||||
|
echo "nestri-entry: dbus ready (via dbus-launch) PID=${DBUS_SESSION_BUS_PID:-}" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
export DBUS_SESSION_BUS_ADDRESS
|
||||||
|
|
||||||
|
# --- PipeWire ---
|
||||||
|
echo "nestri-entry: starting pipewire..." >&2
|
||||||
|
pipewire &
|
||||||
|
PIDS+=($!)
|
||||||
|
|
||||||
|
# Wait for PipeWire socket
|
||||||
|
for i in $(seq 1 50); do
|
||||||
|
[ -S "$XDG_RUNTIME_DIR/pipewire-0" ] && break
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -S "$XDG_RUNTIME_DIR/pipewire-0" ]; then
|
||||||
|
echo "nestri-entry: pipewire ready" >&2
|
||||||
|
|
||||||
|
# WirePlumber needs both PipeWire AND D-Bus
|
||||||
|
if [ -n "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then
|
||||||
|
wireplumber &
|
||||||
|
PIDS+=($!)
|
||||||
|
sleep 0.5
|
||||||
|
echo "nestri-entry: wireplumber ready" >&2
|
||||||
|
else
|
||||||
|
echo "nestri-entry: WARNING — skipping wireplumber (no dbus)" >&2
|
||||||
|
echo "nestri-entry: audio routing may not work correctly" >&2
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "nestri-entry: WARNING — pipewire not ready, continuing without audio" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Wait for WirePlumber to register the loopback node
|
||||||
|
for i in $(seq 1 50); do
|
||||||
|
if pw-cli ls Node 2>/dev/null | grep -q "nestri-source"; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
|
||||||
|
if pw-cli ls Node 2>/dev/null | grep -q "nestri-source"; then
|
||||||
|
echo "nestri-entry: wireplumber ready, loopback node available" >&2
|
||||||
|
else
|
||||||
|
echo "nestri-entry: WARNING — loopback node not found after 5s" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 2. GStreamer Pipeline — Encoder Detection & Configuration
|
||||||
|
#
|
||||||
|
# VAAPI encoders come in two variants:
|
||||||
|
# - vaXenc — standard encoder
|
||||||
|
# - vaXlpenc — low-power variant (sometimes the only option)
|
||||||
|
#
|
||||||
|
# We probe for available encoders and use what's present.
|
||||||
|
# ============================================================
|
||||||
|
|
||||||
|
# Check if a GStreamer element exists
|
||||||
|
gst_element_exists() {
|
||||||
|
gst-inspect-1.0 "$1" &>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Find the best available VAAPI encoder for a codec
|
||||||
|
find_vaapi_encoder() {
|
||||||
|
local codec="$1"
|
||||||
|
local standard_enc="va${codec}enc"
|
||||||
|
local lowpower_enc="va${codec}lpenc"
|
||||||
|
|
||||||
|
# Prefer standard encoder, fall back to low-power
|
||||||
|
if gst_element_exists "$standard_enc"; then
|
||||||
|
echo "$standard_enc"
|
||||||
|
elif gst_element_exists "$lowpower_enc"; then
|
||||||
|
echo "$lowpower_enc"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 2. GStreamer Pipeline — Encoding Configuration
|
||||||
|
#
|
||||||
|
# GPU-specific encoding paths:
|
||||||
|
#
|
||||||
|
# NVIDIA (NVENC):
|
||||||
|
# Memory: video/x-raw(memory:CUDAMemory)
|
||||||
|
# H.264: nvh264enc (p1 preset, ultra-low-latency tune)
|
||||||
|
# H.265: nvh265enc (p1 preset, ultra-low-latency tune)
|
||||||
|
# AV1: nvav1enc (p1 preset, ultra-low-latency tune)
|
||||||
|
#
|
||||||
|
# Modern NVENC presets (p1-p7):
|
||||||
|
# p1 = fastest (lowest quality)
|
||||||
|
# p7 = slowest (highest quality)
|
||||||
|
# Tunes: ultra-low-latency, low-latency, high-quality
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Intel (QSV):
|
||||||
|
# Memory: video/x-raw(memory:DMABuf) → vapostproc → video/x-raw(memory:VAMemory)
|
||||||
|
# H.264: qsvh264enc
|
||||||
|
# H.265: qsvh265enc
|
||||||
|
# AV1: qsvav1enc
|
||||||
|
#
|
||||||
|
# target-usage is 7 for all (speed) with low-latency set to true
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# AMD/Intel/.. (VAAPI):
|
||||||
|
# Memory: video/x-raw(memory:DMABuf) → vapostproc → video/x-raw(memory:VAMemory)
|
||||||
|
# H.264: vah264enc or vah264lpenc (low-power variant)
|
||||||
|
# H.265: vah265enc or vah265lpenc (low-power variant)
|
||||||
|
# AV1: vaav1enc or vaav1lpenc (low-power variant)
|
||||||
|
#
|
||||||
|
# target-usage: 1 (quality) to 7 (speed)
|
||||||
|
# For streaming, we use 7 (maximum speed/minimum latency)
|
||||||
|
#
|
||||||
|
# The vapostproc element converts DMA-BUF to VA-API memory and
|
||||||
|
# transforms to NV12 format required by the VA-API encoders.
|
||||||
|
# ============================================================
|
||||||
|
|
||||||
|
# Calculate GOP size (keyframe interval)
|
||||||
|
# For low latency, we use 1-2 seconds worth of frames
|
||||||
|
GOP_SIZE=$((NESTRI_FPS * 2))
|
||||||
|
|
||||||
|
setup_vaapi_encoder() {
|
||||||
|
# AMD/Intel VAAPI path — uses DMA-BUF → VA-API memory
|
||||||
|
# vapostproc handles colorspace conversion to NV12
|
||||||
|
GST_MEM_CAPS="video/x-raw(memory:DMABuf),width=${NESTRI_WIDTH},height=${NESTRI_HEIGHT},framerate=${NESTRI_FPS}/1 ! vapostproc ! video/x-raw(memory:VAMemory),format=NV12"
|
||||||
|
|
||||||
|
case "$NESTRI_CODEC" in
|
||||||
|
av1)
|
||||||
|
VAAPI_ENC=$(find_vaapi_encoder "av1")
|
||||||
|
if [ -z "$VAAPI_ENC" ]; then
|
||||||
|
echo "nestri-entry: FATAL — no VAAPI AV1 encoder found" >&2
|
||||||
|
echo "nestri-entry: tried: vaav1enc, vaav1penc" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "nestri-entry: using VAAPI encoder: $VAAPI_ENC" >&2
|
||||||
|
GST_ENC="$VAAPI_ENC"
|
||||||
|
GST_ENC="$GST_ENC bitrate=${NESTRI_BITRATE}"
|
||||||
|
GST_ENC="$GST_ENC key-int-max=${GOP_SIZE}"
|
||||||
|
GST_ENC="$GST_ENC target-usage=7"
|
||||||
|
;;
|
||||||
|
h265)
|
||||||
|
VAAPI_ENC=$(find_vaapi_encoder "h265")
|
||||||
|
if [ -z "$VAAPI_ENC" ]; then
|
||||||
|
echo "nestri-entry: FATAL — no VAAPI H.265 encoder found" >&2
|
||||||
|
echo "nestri-entry: tried: vah265enc, vah265lpenc" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "nestri-entry: using VAAPI encoder: $VAAPI_ENC" >&2
|
||||||
|
GST_ENC="$VAAPI_ENC"
|
||||||
|
GST_ENC="$GST_ENC bitrate=${NESTRI_BITRATE}"
|
||||||
|
GST_ENC="$GST_ENC key-int-max=${GOP_SIZE}"
|
||||||
|
GST_ENC="$GST_ENC target-usage=7"
|
||||||
|
;;
|
||||||
|
h264|*)
|
||||||
|
VAAPI_ENC=$(find_vaapi_encoder "h264")
|
||||||
|
if [ -z "$VAAPI_ENC" ]; then
|
||||||
|
echo "nestri-entry: FATAL — no VAAPI H.264 encoder found" >&2
|
||||||
|
echo "nestri-entry: tried: vah264enc, vah264lpenc" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "nestri-entry: using VAAPI encoder: $VAAPI_ENC" >&2
|
||||||
|
GST_ENC="$VAAPI_ENC"
|
||||||
|
GST_ENC="$GST_ENC bitrate=${NESTRI_BITRATE}"
|
||||||
|
GST_ENC="$GST_ENC key-int-max=${GOP_SIZE}"
|
||||||
|
GST_ENC="$GST_ENC target-usage=7"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Select memory caps and encoder based on GPU type
|
||||||
|
case "$NESTRI_GPU" in
|
||||||
|
nvidia)
|
||||||
|
# NVIDIA NVENC path — uses CUDA memory
|
||||||
|
# Modern presets: p1 (fastest) to p7 (highest quality)
|
||||||
|
# Tunes: ultra-low-latency, low-latency, high-quality
|
||||||
|
GST_MEM_CAPS="video/x-raw(memory:CUDAMemory),width=${NESTRI_WIDTH},height=${NESTRI_HEIGHT},framerate=${NESTRI_FPS}/1"
|
||||||
|
|
||||||
|
case "$NESTRI_CODEC" in
|
||||||
|
av1)
|
||||||
|
GST_ENC="nvav1enc"
|
||||||
|
GST_ENC="$GST_ENC bitrate=${NESTRI_BITRATE}"
|
||||||
|
GST_ENC="$GST_ENC gop-size=${GOP_SIZE}"
|
||||||
|
GST_ENC="$GST_ENC preset=p1"
|
||||||
|
GST_ENC="$GST_ENC tune=ultra-low-latency"
|
||||||
|
GST_ENC="$GST_ENC multi-pass=disabled"
|
||||||
|
GST_ENC="$GST_ENC zerolatency=true"
|
||||||
|
;;
|
||||||
|
h265)
|
||||||
|
GST_ENC="nvh265enc"
|
||||||
|
GST_ENC="$GST_ENC bitrate=${NESTRI_BITRATE}"
|
||||||
|
GST_ENC="$GST_ENC gop-size=${GOP_SIZE}"
|
||||||
|
GST_ENC="$GST_ENC preset=p1"
|
||||||
|
GST_ENC="$GST_ENC tune=ultra-low-latency"
|
||||||
|
GST_ENC="$GST_ENC multi-pass=disabled"
|
||||||
|
GST_ENC="$GST_ENC zerolatency=true"
|
||||||
|
;;
|
||||||
|
h264|*)
|
||||||
|
GST_ENC="nvh264enc"
|
||||||
|
GST_ENC="$GST_ENC bitrate=${NESTRI_BITRATE}"
|
||||||
|
GST_ENC="$GST_ENC gop-size=${GOP_SIZE}"
|
||||||
|
GST_ENC="$GST_ENC preset=p1"
|
||||||
|
GST_ENC="$GST_ENC tune=ultra-low-latency"
|
||||||
|
GST_ENC="$GST_ENC multi-pass=disabled"
|
||||||
|
GST_ENC="$GST_ENC zerolatency=true"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
intel)
|
||||||
|
# Check for QSV element plugin
|
||||||
|
if gst_element_exists "qsv"; then
|
||||||
|
# Intel QSV path — uses DMA-BUF → VA-API memory
|
||||||
|
# vapostproc handles colorspace conversion to NV12
|
||||||
|
GST_MEM_CAPS="video/x-raw(memory:DMABuf),width=${NESTRI_WIDTH},height=${NESTRI_HEIGHT},framerate=${NESTRI_FPS}/1 ! vapostproc ! video/x-raw(memory:VAMemory),format=NV12"
|
||||||
|
|
||||||
|
case "$NESTRI_CODEC" in
|
||||||
|
av1)
|
||||||
|
GST_ENC="qsvav1enc"
|
||||||
|
GST_ENC="$GST_ENC bitrate=${NESTRI_BITRATE}"
|
||||||
|
GST_ENC="$GST_ENC gop-size=${GOP_SIZE}"
|
||||||
|
GST_ENC="$GST_ENC target-usage=7"
|
||||||
|
GST_ENC="$GST_ENC low-latency=true"
|
||||||
|
;;
|
||||||
|
h265)
|
||||||
|
GST_ENC="qsvh265enc"
|
||||||
|
GST_ENC="$GST_ENC bitrate=${NESTRI_BITRATE}"
|
||||||
|
GST_ENC="$GST_ENC gop-size=${GOP_SIZE}"
|
||||||
|
GST_ENC="$GST_ENC target-usage=7"
|
||||||
|
GST_ENC="$GST_ENC low-latency=true"
|
||||||
|
;;
|
||||||
|
h264|*)
|
||||||
|
GST_ENC="qsvh264enc"
|
||||||
|
GST_ENC="$GST_ENC bitrate=${NESTRI_BITRATE}"
|
||||||
|
GST_ENC="$GST_ENC gop-size=${GOP_SIZE}"
|
||||||
|
GST_ENC="$GST_ENC target-usage=7"
|
||||||
|
GST_ENC="$GST_ENC low-latency=true"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
# Fallback to VAAPI if no QSV available
|
||||||
|
setup_vaapi_encoder
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
amd|*)
|
||||||
|
setup_vaapi_encoder
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 2. GStreamer Pipeline — Launch
|
||||||
|
#
|
||||||
|
# Pipeline structure:
|
||||||
|
#
|
||||||
|
# Video path:
|
||||||
|
# waylanddisplaysrc (compositor + capture)
|
||||||
|
# → queue (buffer management)
|
||||||
|
# → [GPU-specific caps + encoder]
|
||||||
|
# → [codec parser]
|
||||||
|
#
|
||||||
|
# Audio path:
|
||||||
|
# pipewiresrc (capture from PipeWire)
|
||||||
|
# → audioconvert/audiorate/audioresample
|
||||||
|
# → opusenc (Opus encoding @ 128kbps)
|
||||||
|
#
|
||||||
|
# Output:
|
||||||
|
# nestrisink → QUIC/iroh-moq streaming
|
||||||
|
#
|
||||||
|
# waylanddisplaysrc IS the Wayland compositor:
|
||||||
|
# - Creates socket at $XDG_RUNTIME_DIR/wayland-1
|
||||||
|
# - Captures client buffers as DMA-BUF (zero-copy)
|
||||||
|
# - Input events arrive via nestrisink (bidirectional)
|
||||||
|
# ============================================================
|
||||||
|
|
||||||
|
echo "nestri-entry: starting gstreamer pipeline..." >&2
|
||||||
|
echo "nestri-entry: resolution: ${NESTRI_WIDTH}x${NESTRI_HEIGHT}@${NESTRI_FPS}fps" >&2
|
||||||
|
echo "nestri-entry: bitrate: ${NESTRI_BITRATE}kbps" >&2
|
||||||
|
echo "nestri-entry: gop-size: ${GOP_SIZE} frames" >&2
|
||||||
|
echo "nestri-entry: render: ${NESTRI_RENDER_NODE}" >&2
|
||||||
|
echo "nestri-entry: gpu: ${NESTRI_GPU}" >&2
|
||||||
|
echo "nestri-entry: codec: ${NESTRI_CODEC}" >&2
|
||||||
|
echo "nestri-entry: encoder: ${GST_ENC%% *}" >&2
|
||||||
|
echo "nestri-entry: broadcast: ${NESTRI_BROADCAST}" >&2
|
||||||
|
|
||||||
|
# Note: GST_MEM_CAPS and GST_ENC are intentionally unquoted
|
||||||
|
# to allow bash word splitting for GStreamer's '!' element separators.
|
||||||
|
|
||||||
|
gst-launch-1.0 --gst-debug-no-color -e \
|
||||||
|
nestrisink name=sink broadcast="$NESTRI_BROADCAST" \
|
||||||
|
waylanddisplaysrc render-node="$NESTRI_RENDER_NODE" ! \
|
||||||
|
queue max-size-buffers=2 max-size-time=0 max-size-bytes=0 ! \
|
||||||
|
$GST_MEM_CAPS ! \
|
||||||
|
$GST_ENC ! \
|
||||||
|
sink. \
|
||||||
|
pipewiresrc target-object="nestri-source" use-bufferpool=false do-timestamp=true ! \
|
||||||
|
queue max-size-buffers=2 max-size-time=0 max-size-bytes=0 ! \
|
||||||
|
"audio/x-raw,format=S16LE,channels=2,rate=48000" ! \
|
||||||
|
audioconvert ! \
|
||||||
|
audiorate ! \
|
||||||
|
audioresample ! \
|
||||||
|
opusenc bitrate=128000 frame-size=10 ! \
|
||||||
|
sink. \
|
||||||
|
>> /tmp/gstreamer.log 2>&1 &
|
||||||
|
|
||||||
|
GST_PID=$!
|
||||||
|
PIDS+=($GST_PID)
|
||||||
|
|
||||||
|
# Wait for compositor socket
|
||||||
|
for i in $(seq 1 100); do
|
||||||
|
[ -S "$XDG_RUNTIME_DIR/wayland-1" ] && break
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -S "$XDG_RUNTIME_DIR/wayland-1" ]; then
|
||||||
|
echo "nestri-entry: FATAL — compositor socket not created" >&2
|
||||||
|
echo "nestri-entry: check waylanddisplaysrc plugin and GPU access" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "nestri-entry: wayland compositor ready at $XDG_RUNTIME_DIR/wayland-1" >&2
|
||||||
|
|
||||||
|
# X_DISPLAY_NUM="12"
|
||||||
|
|
||||||
|
# X_SOCKET="/tmp/.X11-unix/X$X_DISPLAY_NUM"
|
||||||
|
|
||||||
|
# # Launch the XWayland satellite process to handle X11 clients in the VM.
|
||||||
|
# xwayland-satellite ":$X_DISPLAY_NUM" >> /tmp/x11.log 2>&1 &
|
||||||
|
# PIDS+=($!)
|
||||||
|
|
||||||
|
# # Wait for X11 socket
|
||||||
|
# for i in $(seq 1 100); do
|
||||||
|
# [ -S "$X_SOCKET" ] && break
|
||||||
|
# sleep 0.1
|
||||||
|
# done
|
||||||
|
|
||||||
|
# if [ ! -S "$X_SOCKET" ]; then
|
||||||
|
# echo "nestri-entry: FATAL — X11 socket $X_SOCKET not created" >&2
|
||||||
|
# echo "nestri-entry: check xwayland-satellite logs for startup errors" >&2
|
||||||
|
# exit 1
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# echo "nestri-entry: X11 server ready at $X_SOCKET" >&2
|
||||||
|
|
||||||
|
# export DISPLAY=":$X_DISPLAY_NUM"
|
||||||
|
# ============================================================
|
||||||
|
# DNS Setup
|
||||||
|
#
|
||||||
|
# passt (muvm's network backend) reads /etc/resolv.conf from
|
||||||
|
# the bwrap namespace to get DNS servers for the VM's DHCP.
|
||||||
|
# The rootfs may have a stale or symlinked resolv.conf.
|
||||||
|
# We overwrite it here with the real DNS from the host.
|
||||||
|
#
|
||||||
|
# nestri-init also tries to copy /run/nestri/resolv.conf into
|
||||||
|
# the VM's /etc/resolv.conf, but that often fails because the
|
||||||
|
# VM filesystem may be read-only. Fixing it here in the bwrap
|
||||||
|
# layer ensures passt gets the right servers.
|
||||||
|
# ============================================================
|
||||||
|
|
||||||
|
if [ -f /run/nestri/resolv.conf ]; then
|
||||||
|
# Remove symlink if present, then write directly
|
||||||
|
rm -f /etc/resolv.conf 2>/dev/null || true
|
||||||
|
cp /run/nestri/resolv.conf /etc/resolv.conf 2>/dev/null || {
|
||||||
|
# If /etc is somehow read-only, try writing in-place
|
||||||
|
cat /run/nestri/resolv.conf > /etc/resolv.conf 2>/dev/null || true
|
||||||
|
}
|
||||||
|
echo "nestri-entry: DNS configured:" >&2
|
||||||
|
cat /etc/resolv.conf >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 3. muvm — MicroVM Launch
|
||||||
|
#
|
||||||
|
# The VM boots from this same filesystem via virtiofs.
|
||||||
|
# nestri-init wraps systemd, setting up machine-id, dns, etc.
|
||||||
|
#
|
||||||
|
# Guest systemd services (started automatically):
|
||||||
|
# nestri-network.service — muvm-configure-network (networking)
|
||||||
|
# nestri-wayland-proxy.* — wl-cross-domain-proxy (socket-activated)
|
||||||
|
# nestri-pwbridge.* — muvm-pwbridge (socket-activated audio)
|
||||||
|
# nestri-session-bus.* — dbus-daemon (socket-activated)
|
||||||
|
# nestri-remote.service — muvm-remote (runs user command)
|
||||||
|
#
|
||||||
|
# Cross-domain Wayland proxy:
|
||||||
|
# The VM guest runs wl-cross-domain-proxy which connects to
|
||||||
|
# the host's wayland-1 socket via virtio-gpu cross-domain context.
|
||||||
|
# This allows the guest gamescope to render to the host compositor.
|
||||||
|
#
|
||||||
|
# Environment passed to guest:
|
||||||
|
# WAYLAND_DISPLAY=wayland-1 — compositor socket name
|
||||||
|
# XDG_RUNTIME_DIR=/run/vm-user — guest runtime directory
|
||||||
|
# XDG_SESSION_TYPE=wayland — session type hint
|
||||||
|
# SDL_VIDEODRIVER=wayland — force SDL wayland backend
|
||||||
|
# SDL_AUDIO_DRIVER=pipewire — force SDL pipewire audio
|
||||||
|
# NESTRI_* — stream configuration
|
||||||
|
# ============================================================
|
||||||
|
echo "nestri-entry: starting muvm..." >&2
|
||||||
|
|
||||||
|
# -e "SDL_VIDEODRIVER=wayland" \
|
||||||
|
# -e "ELECTRON_OZONE_PLATFORM_HINT=wayland" \
|
||||||
|
# -e "_JAVA_AWT_WM_NONREPARENTING=1" \
|
||||||
|
# -e "QT_QPA_PLATFORM=wayland" \
|
||||||
|
|
||||||
|
muvm \
|
||||||
|
--custom-init-cmdline "nestri-init /sbin/init --echo-target=console" \
|
||||||
|
-e "container=muvm" \
|
||||||
|
-e "XDG_SESSION_TYPE=wayland" \
|
||||||
|
-e "XDG_RUNTIME_DIR=/run/vm-user" \
|
||||||
|
-e "SDL_AUDIO_DRIVER=pipewire" \
|
||||||
|
-e "WAYLAND_DISPLAY=wayland-1" \
|
||||||
|
-e "VK_DRIVER_FILES=$VK_DRIVER_FILES" \
|
||||||
|
-e "NESTRI_WIDTH=$NESTRI_WIDTH" \
|
||||||
|
-e "NESTRI_HEIGHT=$NESTRI_HEIGHT" \
|
||||||
|
-e "NESTRI_FPS=$NESTRI_FPS" \
|
||||||
|
-e "MICROVM_UID=$MICROVM_UID" \
|
||||||
|
-e "MICROVM_GID=${MICROVM_GID:-$MICROVM_UID}" \
|
||||||
|
-e "BOOT_TIME_OFFSET=${BOOT_TIME_OFFSET:-}" \
|
||||||
|
-i -t \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
MUVM_EXIT=$?
|
||||||
|
|
||||||
|
echo "nestri-entry: muvm exited with code $MUVM_EXIT" >&2
|
||||||
|
|
||||||
|
exit $MUVM_EXIT
|
||||||
|
# /usr/bin/steam -gamepadui -cef-force-gpu &
|
||||||
|
# STEAM_PID=$!
|
||||||
|
# PIDS+=($STEAM_PID)
|
||||||
|
|
||||||
|
# wait $STEAM_PID
|
||||||
93
build/usr/bin/nestri-init
Normal file
93
build/usr/bin/nestri-init
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 1. Save files from old /run
|
||||||
|
# ============================================================
|
||||||
|
_resolv=""
|
||||||
|
_localtime=""
|
||||||
|
[ -f /run/nestri/resolv.conf ] && _resolv=$(cat /run/nestri/resolv.conf)
|
||||||
|
[ -f /run/nestri/localtime ] && _localtime=$(base64 /run/nestri/localtime 2>/dev/null) || true
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 2. Fresh tmpfs on /run
|
||||||
|
# ============================================================
|
||||||
|
mount -t tmpfs tmpfs /run -o nosuid,nodev,strictatime
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 3. Restore saved files
|
||||||
|
# ============================================================
|
||||||
|
if [ -n "$_resolv" ]; then
|
||||||
|
echo "$_resolv" > /run/resolv.conf
|
||||||
|
echo "$_resolv" > /etc/resolv.conf 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
if [ -n "$_localtime" ]; then
|
||||||
|
echo "$_localtime" | base64 -d > /run/localtime
|
||||||
|
echo "$_localtime" | base64 -d > /etc/localtime 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 4. Machine ID
|
||||||
|
# ============================================================
|
||||||
|
# FIXME(wanjohiryan): Use the same machine-id as the host? For Steam, i believe it does check machine id and stuff like that for SteamGuard
|
||||||
|
if [ ! -s /etc/machine-id ]; then
|
||||||
|
head -c 16 /dev/urandom | od -A n -t x1 | tr -d ' \n' > /etc/machine-id
|
||||||
|
echo "" >> /etc/machine-id
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 5. Journald
|
||||||
|
# ============================================================
|
||||||
|
mkdir -p /run/systemd/journal /run/log/journal
|
||||||
|
|
||||||
|
mkdir -p /etc/systemd/system/systemd-journald.service.d
|
||||||
|
cat > /etc/systemd/system/systemd-journald.service.d/override.conf << 'EOF'
|
||||||
|
[Service]
|
||||||
|
RuntimeDirectory=
|
||||||
|
LogsDirectory=
|
||||||
|
StateDirectory=
|
||||||
|
ExecStartPre=/bin/mkdir -p /run/systemd/journal /run/log/journal
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 6. Hide container FILE markers (ro rootfs)
|
||||||
|
# But DO NOT strip the `container` env var!
|
||||||
|
# systemd needs it for exit.target (clean shutdown).
|
||||||
|
# ============================================================
|
||||||
|
for marker in /.dockerenv /run/.containerenv; do
|
||||||
|
if [ -e "$marker" ]; then
|
||||||
|
mount --bind /dev/null "$marker" 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 8. Isolate X11 socket directory
|
||||||
|
# ============================================================
|
||||||
|
if [ -d /tmp/.X11-unix ]; then
|
||||||
|
mount -t tmpfs tmpfs /tmp/.X11-unix -o noexec,nosuid,relatime
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 9. Remount /dev/shm as virtiofs with DAX
|
||||||
|
# (required for cross-domain shared memory, DRI3 fences)
|
||||||
|
# ============================================================
|
||||||
|
umount /dev/shm
|
||||||
|
mount -t virtiofs devshm /dev/shm -o noexec,nosuid,dax
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 10. Boot time offset
|
||||||
|
# ============================================================
|
||||||
|
if [ -n "$BOOT_TIME_OFFSET" ]; then
|
||||||
|
if unshare --time true 2>/dev/null; then
|
||||||
|
exec unshare --time -- bash -c '
|
||||||
|
echo "monotonic '"$BOOT_TIME_OFFSET"'" > /proc/self/timens_offsets 2>/dev/null
|
||||||
|
echo "boottime '"$BOOT_TIME_OFFSET"'" >> /proc/self/timens_offsets 2>/dev/null
|
||||||
|
exec "$@"
|
||||||
|
' -- "$@"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 11. Hand off to systemd
|
||||||
|
# ============================================================
|
||||||
|
exec "$@"
|
||||||
BIN
build/usr/bin/steam-token.exe
Executable file
BIN
build/usr/bin/steam-token.exe
Executable file
Binary file not shown.
@@ -1,42 +0,0 @@
|
|||||||
The Nestri Commercial License (the “Commercial License”)
|
|
||||||
Copyright (c) 2023-present Nestri Labs, Inc
|
|
||||||
|
|
||||||
With regard to the Nestri Software:
|
|
||||||
|
|
||||||
This software and associated documentation files (the "Software") may only be
|
|
||||||
used in production, if you (and any entity that you represent) have agreed to,
|
|
||||||
and are in compliance with, the Nestri Subscription Terms available
|
|
||||||
at https://nestri.io/terms, or other agreements governing
|
|
||||||
the use of the Software, as mutually agreed by you and Nestri Labs, Inc,
|
|
||||||
and otherwise have a valid Nestri Enterprise Edition subscription ("Commercial Subscription")
|
|
||||||
for the correct number of hosts as defined in the "Commercial Terms ("Hosts"). Subject to the foregoing sentence,
|
|
||||||
you are free to modify this Software and publish patches to the Software. You agree
|
|
||||||
that Nestri Labs 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 Commercial Subscription for the correct number of hosts.
|
|
||||||
Notwithstanding the foregoing, you may copy and modify the Software for development
|
|
||||||
and testing purposes, without requiring a subscription. You agree that Cal.com 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 the foregoing, it is forbidden to copy, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell the Software.
|
|
||||||
|
|
||||||
This Commercial License applies only to the part of this Software that is not distributed under
|
|
||||||
the AGPLv3 license. Any part of this Software distributed under the MIT license or which
|
|
||||||
is served client-side as an image, font, cascading stylesheet (CSS), file which produces
|
|
||||||
or is compiled, arranged, augmented, or combined into client-side JavaScript, in whole or
|
|
||||||
in part, is copyrighted under the AGPLv3 license. The full text of this Commercial License shall
|
|
||||||
be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, 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 THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
For all third party components incorporated into the Nestri Software, those
|
|
||||||
components are licensed under the original license provided by the owner of the
|
|
||||||
applicable component.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import { urls } from "./urls";
|
|
||||||
import { auth } from "./auth";
|
|
||||||
import { domain } from "./stage";
|
|
||||||
import { secret } from "./secrets";
|
|
||||||
import { database } from "./database";
|
|
||||||
|
|
||||||
export const api = new sst.cloudflare.Worker("Api", {
|
|
||||||
url: true,
|
|
||||||
domain: `api.${domain}`,
|
|
||||||
handler: "cloud/packages/functions/src/api/index.ts",
|
|
||||||
link: [database, secret.POLAR_API_KEY, urls, auth],
|
|
||||||
});
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import { domain } from "./stage";
|
|
||||||
import { secret } from "./secrets";
|
|
||||||
import { database } from "./database";
|
|
||||||
|
|
||||||
const authStorage = new sst.cloudflare.Kv("AuthStorage");
|
|
||||||
|
|
||||||
export const auth = new sst.cloudflare.Worker("Auth", {
|
|
||||||
handler: "cloud/packages/functions/src/auth/index.ts",
|
|
||||||
domain: `auth.${domain}`,
|
|
||||||
url: true,
|
|
||||||
link: [
|
|
||||||
database,
|
|
||||||
authStorage,
|
|
||||||
secret.POLAR_API_KEY,
|
|
||||||
secret.DISCORD_CLIENT_ID,
|
|
||||||
secret.DISCORD_CLIENT_SECRET,
|
|
||||||
],
|
|
||||||
transform: {
|
|
||||||
worker: {
|
|
||||||
placement: {
|
|
||||||
mode: "smart",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
const dbProject = neon.getProjectOutput({
|
|
||||||
id: "curly-fire-59112557",
|
|
||||||
});
|
|
||||||
|
|
||||||
const dbBranchId =
|
|
||||||
$app.stage !== "production"
|
|
||||||
? new neon.Branch("NeonBranch", {
|
|
||||||
parentId: dbProject.defaultBranchId,
|
|
||||||
projectId: dbProject.id,
|
|
||||||
name: $app.stage,
|
|
||||||
}).id
|
|
||||||
: dbProject.defaultBranchId;
|
|
||||||
|
|
||||||
const dbEndpoint = new neon.Endpoint("NeonEndpoint", {
|
|
||||||
projectId: dbProject.id,
|
|
||||||
branchId: dbBranchId,
|
|
||||||
poolerEnabled: true,
|
|
||||||
type: "read_write",
|
|
||||||
});
|
|
||||||
|
|
||||||
const dbRole = new neon.Role("NeonRole", {
|
|
||||||
name: `nestri-${$app.stage}-role`,
|
|
||||||
branchId: dbBranchId,
|
|
||||||
projectId: dbProject.id,
|
|
||||||
});
|
|
||||||
|
|
||||||
const db = new neon.Database(
|
|
||||||
"NeonDatabase",
|
|
||||||
{
|
|
||||||
branchId: dbBranchId,
|
|
||||||
projectId: dbProject.id,
|
|
||||||
ownerName: dbRole.name,
|
|
||||||
name: `nestri-${$app.stage}`,
|
|
||||||
},
|
|
||||||
{ dependsOn: [dbRole] },
|
|
||||||
);
|
|
||||||
|
|
||||||
export const database = new sst.Linkable("Database", {
|
|
||||||
properties: {
|
|
||||||
name: db.name,
|
|
||||||
user: dbRole.name,
|
|
||||||
host: dbEndpoint.host,
|
|
||||||
password: dbRole.password,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
new sst.x.DevCommand("Studio", {
|
|
||||||
link: [database],
|
|
||||||
dev: {
|
|
||||||
command: "bun db studio",
|
|
||||||
directory: "cloud/packages/core",
|
|
||||||
autostart: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
export const secret = {
|
|
||||||
DISCORD_CLIENT_ID: new sst.Secret("DISCORD_CLIENT_ID"),
|
|
||||||
DISCORD_CLIENT_SECRET: new sst.Secret("DISCORD_CLIENT_SECRET"),
|
|
||||||
POLAR_API_KEY: new sst.Secret("POLAR_API_KEY"),
|
|
||||||
};
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
export const domain = (() => {
|
|
||||||
if ($app.stage === "production") return "nestri.io"
|
|
||||||
if ($app.stage === "dev") return "dev.nestri.io"
|
|
||||||
return `${$app.stage}.dev.nestri.io`
|
|
||||||
})()
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import { domain } from "./stage";
|
|
||||||
|
|
||||||
export const urls = new sst.Linkable("Urls", {
|
|
||||||
properties: {
|
|
||||||
api: "https://api." + domain,
|
|
||||||
auth: "https://auth." + domain,
|
|
||||||
site: $dev ? "http://localhost:4321" : "https://" + domain,
|
|
||||||
openapi: "https://api." + domain + "/doc",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import { Resource } from "sst";
|
|
||||||
import { defineConfig } from "drizzle-kit";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
verbose: true,
|
|
||||||
out: "./migrations",
|
|
||||||
dialect: "postgresql",
|
|
||||||
dbCredentials: {
|
|
||||||
url: `postgres://${Resource.Database.user}:${Resource.Database.password}@${Resource.Database.host}/${Resource.Database.name}?sslmode=require`,
|
|
||||||
},
|
|
||||||
schema: "./src/**/*.sql.ts",
|
|
||||||
});
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
CREATE TABLE "member" (
|
|
||||||
"id" char(30) NOT NULL,
|
|
||||||
"team_id" char(30) NOT NULL,
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"time_seen" timestamp with time zone,
|
|
||||||
"email" varchar(255) NOT NULL,
|
|
||||||
CONSTRAINT "member_team_id_id_pk" PRIMARY KEY("team_id","id")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE "team" (
|
|
||||||
"id" char(30) PRIMARY KEY NOT NULL,
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"name" varchar(255) NOT NULL,
|
|
||||||
"slug" varchar(255) NOT NULL,
|
|
||||||
"plan_type" text NOT NULL
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE "user" (
|
|
||||||
"id" char(30) PRIMARY KEY NOT NULL,
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"avatar_url" text,
|
|
||||||
"name" varchar(255) NOT NULL,
|
|
||||||
"discriminator" integer NOT NULL,
|
|
||||||
"email" varchar(255) NOT NULL,
|
|
||||||
"polar_customer_id" varchar(255),
|
|
||||||
"flags" json DEFAULT '{}'::json,
|
|
||||||
CONSTRAINT "user_polar_customer_id_unique" UNIQUE("polar_customer_id")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE INDEX "email_global" ON "member" USING btree ("email");--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX "member_email" ON "member" USING btree ("team_id","email");--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX "team_slug" ON "team" USING btree ("slug");--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX "user_email" ON "user" USING btree ("email");
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
DROP INDEX "team_slug";--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX "slug" ON "team" USING btree ("slug");
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
CREATE TABLE "steam" (
|
|
||||||
"id" char(30) NOT NULL,
|
|
||||||
"user_id" char(30) NOT NULL,
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"avatar_url" text NOT NULL,
|
|
||||||
"access_token" text NOT NULL,
|
|
||||||
"email" varchar(255) NOT NULL,
|
|
||||||
"country" varchar(255) NOT NULL,
|
|
||||||
"username" varchar(255) NOT NULL,
|
|
||||||
"persona_name" varchar(255) NOT NULL,
|
|
||||||
CONSTRAINT "steam_user_id_id_pk" PRIMARY KEY("user_id","id")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE INDEX "global_steam_email" ON "steam" USING btree ("email");--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX "steam_email" ON "steam" USING btree ("user_id","email");
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
CREATE TABLE "machine" (
|
|
||||||
"id" char(30) PRIMARY KEY NOT NULL,
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"country" text NOT NULL,
|
|
||||||
"timezone" text NOT NULL,
|
|
||||||
"location" "point" NOT NULL,
|
|
||||||
"fingerprint" varchar(32) NOT NULL,
|
|
||||||
"country_code" varchar(2) NOT NULL
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX "machine_fingerprint" ON "machine" USING btree ("fingerprint");
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
CREATE TABLE "machine" (
|
|
||||||
"id" char(30) PRIMARY KEY NOT NULL,
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"country" text NOT NULL,
|
|
||||||
"timezone" text NOT NULL,
|
|
||||||
"location" "point" NOT NULL,
|
|
||||||
"fingerprint" varchar(32) NOT NULL,
|
|
||||||
"country_code" varchar(2) NOT NULL
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam" RENAME COLUMN "country" TO "country_code";--> statement-breakpoint
|
|
||||||
DROP INDEX "global_steam_email";--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam" ADD COLUMN "time_seen" timestamp with time zone;--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam" ADD COLUMN "steam_id" integer NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam" ADD COLUMN "last_game" json NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam" ADD COLUMN "steam_email" varchar(255) NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam" ADD COLUMN "limitation" json NOT NULL;--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX "machine_fingerprint" ON "machine" USING btree ("fingerprint");--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam" DROP COLUMN "access_token";--> statement-breakpoint
|
|
||||||
ALTER TABLE "user" DROP COLUMN "flags";
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ALTER TABLE "steam" RENAME COLUMN "time_seen" TO "last_seen";--> statement-breakpoint
|
|
||||||
DROP INDEX "steam_email";--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam" DROP CONSTRAINT "steam_user_id_id_pk";--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam" ADD PRIMARY KEY ("id");--> statement-breakpoint
|
|
||||||
ALTER TABLE "machine" ADD CONSTRAINT "machine_user_id_id_pk" PRIMARY KEY("user_id","id");--> statement-breakpoint
|
|
||||||
ALTER TABLE "machine" ADD COLUMN "user_id" char(30);--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam" ADD CONSTRAINT "steam_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam" DROP COLUMN "email";
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
ALTER TABLE "machine" DROP CONSTRAINT "machine_user_id_id_pk";--> statement-breakpoint
|
|
||||||
ALTER TABLE "machine" DROP COLUMN "user_id";
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
ALTER TABLE "member" ADD COLUMN "role" text NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE "team" DROP COLUMN "plan_type";
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
CREATE TABLE "subscription" (
|
|
||||||
"id" char(30) NOT NULL,
|
|
||||||
"user_id" char(30) NOT NULL,
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"team_id" char(30) NOT NULL,
|
|
||||||
"standing" text NOT NULL,
|
|
||||||
"plan_type" text NOT NULL,
|
|
||||||
"tokens" integer NOT NULL,
|
|
||||||
"product_id" varchar(255),
|
|
||||||
"subscription_id" varchar(255)
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "subscription" ADD CONSTRAINT "subscription_team_id_team_id_fk" FOREIGN KEY ("team_id") REFERENCES "public"."team"("id") ON DELETE cascade ON UPDATE no action;
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
ALTER TABLE "subscription" ADD CONSTRAINT "subscription_id_team_id_pk" PRIMARY KEY("id","team_id");--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX "subscription_id" ON "subscription" USING btree ("id");--> statement-breakpoint
|
|
||||||
CREATE INDEX "subscription_user_id" ON "subscription" USING btree ("user_id");
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
CREATE UNIQUE INDEX "steam_id" ON "steam" USING btree ("steam_id");--> statement-breakpoint
|
|
||||||
CREATE INDEX "steam_user_id" ON "steam" USING btree ("user_id");
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
CREATE TYPE "public"."member_role" AS ENUM('child', 'adult');--> statement-breakpoint
|
|
||||||
CREATE TYPE "public"."steam_status" AS ENUM('online', 'offline', 'dnd', 'playing');--> statement-breakpoint
|
|
||||||
CREATE TABLE "steam_account_credentials" (
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"steam_id" varchar(255) PRIMARY KEY NOT NULL,
|
|
||||||
"refresh_token" text NOT NULL,
|
|
||||||
"expiry" timestamp with time zone NOT NULL,
|
|
||||||
"username" varchar(255) NOT NULL
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE "friends_list" (
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"steam_id" varchar(255) NOT NULL,
|
|
||||||
"friend_steam_id" varchar(255) NOT NULL,
|
|
||||||
CONSTRAINT "friends_list_steam_id_friend_steam_id_pk" PRIMARY KEY("steam_id","friend_steam_id")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE "members" (
|
|
||||||
"id" char(30) NOT NULL,
|
|
||||||
"team_id" char(30) NOT NULL,
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"user_id" char(30),
|
|
||||||
"steam_id" varchar(255) NOT NULL,
|
|
||||||
"role" "member_role" NOT NULL,
|
|
||||||
CONSTRAINT "members_id_team_id_pk" PRIMARY KEY("id","team_id")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE "steam_accounts" (
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"steam_id" varchar(255) PRIMARY KEY NOT NULL,
|
|
||||||
"user_id" char(30),
|
|
||||||
"status" "steam_status" NOT NULL,
|
|
||||||
"last_synced_at" timestamp with time zone NOT NULL,
|
|
||||||
"real_name" varchar(255),
|
|
||||||
"member_since" timestamp with time zone NOT NULL,
|
|
||||||
"name" varchar(255) NOT NULL,
|
|
||||||
"profile_url" varchar(255),
|
|
||||||
"username" varchar(255) NOT NULL,
|
|
||||||
"avatar_hash" varchar(255) NOT NULL,
|
|
||||||
"limitations" json NOT NULL,
|
|
||||||
CONSTRAINT "idx_steam_username" UNIQUE("username")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE "teams" (
|
|
||||||
"id" char(30) PRIMARY KEY NOT NULL,
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"name" varchar(255) NOT NULL,
|
|
||||||
"owner_id" char(30) NOT NULL,
|
|
||||||
"invite_code" varchar(10) NOT NULL,
|
|
||||||
"slug" varchar(255) NOT NULL,
|
|
||||||
"max_members" bigint NOT NULL,
|
|
||||||
CONSTRAINT "idx_team_invite_code" UNIQUE("invite_code")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE "users" (
|
|
||||||
"id" char(30) PRIMARY KEY NOT NULL,
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"email" varchar(255) NOT NULL,
|
|
||||||
"avatar_url" text,
|
|
||||||
"last_login" timestamp with time zone NOT NULL,
|
|
||||||
"name" varchar(255) NOT NULL,
|
|
||||||
"polar_customer_id" varchar(255),
|
|
||||||
CONSTRAINT "idx_user_email" UNIQUE("email")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
DROP TABLE "machine" CASCADE;--> statement-breakpoint
|
|
||||||
DROP TABLE "member" CASCADE;--> statement-breakpoint
|
|
||||||
DROP TABLE "steam" CASCADE;--> statement-breakpoint
|
|
||||||
DROP TABLE "subscription" CASCADE;--> statement-breakpoint
|
|
||||||
DROP TABLE "team" CASCADE;--> statement-breakpoint
|
|
||||||
DROP TABLE "user" CASCADE;--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam_account_credentials" ADD CONSTRAINT "steam_account_credentials_steam_id_steam_accounts_steam_id_fk" FOREIGN KEY ("steam_id") REFERENCES "public"."steam_accounts"("steam_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "friends_list" ADD CONSTRAINT "friends_list_steam_id_steam_accounts_steam_id_fk" FOREIGN KEY ("steam_id") REFERENCES "public"."steam_accounts"("steam_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "friends_list" ADD CONSTRAINT "friends_list_friend_steam_id_steam_accounts_steam_id_fk" FOREIGN KEY ("friend_steam_id") REFERENCES "public"."steam_accounts"("steam_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "members" ADD CONSTRAINT "members_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "members" ADD CONSTRAINT "members_steam_id_steam_accounts_steam_id_fk" FOREIGN KEY ("steam_id") REFERENCES "public"."steam_accounts"("steam_id") ON DELETE cascade ON UPDATE restrict;--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam_accounts" ADD CONSTRAINT "steam_accounts_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "teams" ADD CONSTRAINT "teams_owner_id_users_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "teams" ADD CONSTRAINT "teams_slug_steam_accounts_username_fk" FOREIGN KEY ("slug") REFERENCES "public"."steam_accounts"("username") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX "idx_member_steam_id" ON "members" USING btree ("team_id","steam_id");--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX "idx_member_user_id" ON "members" USING btree ("team_id","user_id") WHERE "members"."user_id" is not null;--> statement-breakpoint
|
|
||||||
CREATE UNIQUE INDEX "idx_team_slug" ON "teams" USING btree ("slug");
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
CREATE TYPE "public"."compatibility" AS ENUM('high', 'mid', 'low', 'unknown');--> statement-breakpoint
|
|
||||||
CREATE TYPE "public"."category_type" AS ENUM('tag', 'genre', 'publisher', 'developer');--> statement-breakpoint
|
|
||||||
CREATE TYPE "public"."image_type" AS ENUM('heroArt', 'icon', 'logo', 'superHeroArt', 'poster', 'boxArt', 'screenshot', 'background');--> statement-breakpoint
|
|
||||||
CREATE TABLE "base_games" (
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"id" varchar(255) PRIMARY KEY NOT NULL,
|
|
||||||
"slug" varchar(255) NOT NULL,
|
|
||||||
"name" text NOT NULL,
|
|
||||||
"release_date" timestamp with time zone NOT NULL,
|
|
||||||
"size" json NOT NULL,
|
|
||||||
"description" text NOT NULL,
|
|
||||||
"primary_genre" text NOT NULL,
|
|
||||||
"controller_support" text,
|
|
||||||
"compatibility" "compatibility" DEFAULT 'unknown' NOT NULL,
|
|
||||||
"score" numeric(2, 1) NOT NULL,
|
|
||||||
CONSTRAINT "idx_base_games_slug" UNIQUE("slug")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE "categories" (
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"slug" varchar(255) NOT NULL,
|
|
||||||
"type" "category_type" NOT NULL,
|
|
||||||
"name" text NOT NULL,
|
|
||||||
CONSTRAINT "categories_slug_type_pk" PRIMARY KEY("slug","type")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE "games" (
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"base_game_id" varchar(255) NOT NULL,
|
|
||||||
"category_slug" varchar(255) NOT NULL,
|
|
||||||
"type" "category_type" NOT NULL,
|
|
||||||
CONSTRAINT "games_base_game_id_category_slug_type_pk" PRIMARY KEY("base_game_id","category_slug","type")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE "images" (
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"type" "image_type" NOT NULL,
|
|
||||||
"image_hash" varchar(255) NOT NULL,
|
|
||||||
"base_game_id" varchar(255) NOT NULL,
|
|
||||||
"source_url" text NOT NULL,
|
|
||||||
"position" integer DEFAULT 0 NOT NULL,
|
|
||||||
"file_size" integer NOT NULL,
|
|
||||||
"dimensions" json NOT NULL,
|
|
||||||
"extracted_color" json NOT NULL,
|
|
||||||
CONSTRAINT "images_image_hash_type_base_game_id_position_pk" PRIMARY KEY("image_hash","type","base_game_id","position")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE "game_libraries" (
|
|
||||||
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_updated" timestamp with time zone DEFAULT now() NOT NULL,
|
|
||||||
"time_deleted" timestamp with time zone,
|
|
||||||
"base_game_id" varchar(255) NOT NULL,
|
|
||||||
"owner_id" varchar(255) NOT NULL,
|
|
||||||
CONSTRAINT "game_libraries_base_game_id_owner_id_pk" PRIMARY KEY("base_game_id","owner_id")
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam_accounts" RENAME COLUMN "steam_id" TO "id";--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam_account_credentials" DROP CONSTRAINT "steam_account_credentials_steam_id_steam_accounts_steam_id_fk";
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "friends_list" DROP CONSTRAINT "friends_list_steam_id_steam_accounts_steam_id_fk";
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "friends_list" DROP CONSTRAINT "friends_list_friend_steam_id_steam_accounts_steam_id_fk";
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "members" DROP CONSTRAINT "members_steam_id_steam_accounts_steam_id_fk";
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "games" ADD CONSTRAINT "games_base_game_id_base_games_id_fk" FOREIGN KEY ("base_game_id") REFERENCES "public"."base_games"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "games" ADD CONSTRAINT "games_categories_fkey" FOREIGN KEY ("category_slug","type") REFERENCES "public"."categories"("slug","type") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "images" ADD CONSTRAINT "images_base_game_id_base_games_id_fk" FOREIGN KEY ("base_game_id") REFERENCES "public"."base_games"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" ADD CONSTRAINT "game_libraries_base_game_id_base_games_id_fk" FOREIGN KEY ("base_game_id") REFERENCES "public"."base_games"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" ADD CONSTRAINT "game_libraries_owner_id_steam_accounts_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."steam_accounts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
CREATE INDEX "idx_categories_type" ON "categories" USING btree ("type");--> statement-breakpoint
|
|
||||||
CREATE INDEX "idx_games_category_slug" ON "games" USING btree ("category_slug");--> statement-breakpoint
|
|
||||||
CREATE INDEX "idx_games_category_type" ON "games" USING btree ("type");--> statement-breakpoint
|
|
||||||
CREATE INDEX "idx_images_type" ON "images" USING btree ("type");--> statement-breakpoint
|
|
||||||
CREATE INDEX "idx_images_game_id" ON "images" USING btree ("base_game_id");--> statement-breakpoint
|
|
||||||
CREATE INDEX "idx_game_libraries_owner_id" ON "game_libraries" USING btree ("owner_id");--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam_account_credentials" ADD CONSTRAINT "steam_account_credentials_steam_id_steam_accounts_id_fk" FOREIGN KEY ("steam_id") REFERENCES "public"."steam_accounts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "friends_list" ADD CONSTRAINT "friends_list_steam_id_steam_accounts_id_fk" FOREIGN KEY ("steam_id") REFERENCES "public"."steam_accounts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "friends_list" ADD CONSTRAINT "friends_list_friend_steam_id_steam_accounts_id_fk" FOREIGN KEY ("friend_steam_id") REFERENCES "public"."steam_accounts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "members" ADD CONSTRAINT "members_steam_id_steam_accounts_id_fk" FOREIGN KEY ("steam_id") REFERENCES "public"."steam_accounts"("id") ON DELETE cascade ON UPDATE restrict;--> statement-breakpoint
|
|
||||||
CREATE INDEX "idx_friends_list_friend_steam_id" ON "friends_list" USING btree ("friend_steam_id");
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
ALTER TABLE "games" DROP CONSTRAINT "games_categories_fkey";
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "games" ADD CONSTRAINT "games_categories_fkey" FOREIGN KEY ("category_slug","type") REFERENCES "public"."categories"("slug","type") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
CREATE INDEX "idx_games_category_slug_type" ON "games" USING btree ("category_slug","type");
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
CREATE TYPE "public"."controller_support" AS ENUM('full', 'unknown');--> statement-breakpoint
|
|
||||||
ALTER TABLE "base_games" ALTER COLUMN "controller_support" SET DATA TYPE controller_support;--> statement-breakpoint
|
|
||||||
ALTER TABLE "base_games" ALTER COLUMN "controller_support" SET NOT NULL;
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
ALTER TABLE "base_games" ALTER COLUMN "primary_genre" DROP NOT NULL;
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
ALTER TYPE "public"."controller_support" ADD VALUE 'partial' BEFORE 'unknown';
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
ALTER TABLE "game_libraries" ADD COLUMN "time_acquired" timestamp with time zone NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" ADD COLUMN "last_played" timestamp with time zone NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" ADD COLUMN "total_playtime" integer NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" ADD COLUMN "is_family_shared" boolean NOT NULL;
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
ALTER TABLE "public"."images" ALTER COLUMN "type" SET DATA TYPE text;--> statement-breakpoint
|
|
||||||
DROP TYPE "public"."image_type";--> statement-breakpoint
|
|
||||||
CREATE TYPE "public"."image_type" AS ENUM('heroArt', 'icon', 'logo', 'superHeroArt', 'poster', 'boxArt', 'screenshot', 'backdrop');--> statement-breakpoint
|
|
||||||
ALTER TABLE "public"."images" ALTER COLUMN "type" SET DATA TYPE "public"."image_type" USING "type"::"public"."image_type";
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
ALTER TABLE "public"."images" ALTER COLUMN "type" SET DATA TYPE text;--> statement-breakpoint
|
|
||||||
DROP TYPE "public"."image_type";--> statement-breakpoint
|
|
||||||
CREATE TYPE "public"."image_type" AS ENUM('heroArt', 'icon', 'logo', 'banner', 'poster', 'boxArt', 'screenshot', 'backdrop');--> statement-breakpoint
|
|
||||||
ALTER TABLE "public"."images" ALTER COLUMN "type" SET DATA TYPE "public"."image_type" USING "type"::"public"."image_type";
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
Unfortunately in current drizzle-kit version we can't automatically get name for primary key.
|
|
||||||
We are working on making it available!
|
|
||||||
|
|
||||||
Meanwhile you can:
|
|
||||||
1. Check pk name in your database, by running
|
|
||||||
SELECT constraint_name FROM information_schema.table_constraints
|
|
||||||
WHERE table_schema = 'public'
|
|
||||||
AND table_name = 'steam_account_credentials'
|
|
||||||
AND constraint_type = 'PRIMARY KEY';
|
|
||||||
2. Uncomment code below and paste pk name manually
|
|
||||||
|
|
||||||
Hope to release this update as soon as possible
|
|
||||||
*/
|
|
||||||
|
|
||||||
-- ALTER TABLE "steam_account_credentials" DROP CONSTRAINT "<constraint_name>";--> statement-breakpoint
|
|
||||||
ALTER TABLE "images" ALTER COLUMN "source_url" DROP NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam_account_credentials" ADD CONSTRAINT "steam_account_credentials_steam_id_id_pk" PRIMARY KEY("steam_id","id");--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam_account_credentials" ADD COLUMN "id" char(30) NOT NULL;
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
ALTER TABLE "steam_account_credentials" DISABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
||||||
DROP TABLE "steam_account_credentials" CASCADE;--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" RENAME COLUMN "owner_id" TO "owner_steam_id";--> statement-breakpoint
|
|
||||||
ALTER TABLE "teams" RENAME COLUMN "owner_id" TO "owner_steam_id";--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam_accounts" DROP CONSTRAINT "idx_steam_username";--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" DROP CONSTRAINT "game_libraries_owner_id_steam_accounts_id_fk";
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "teams" DROP CONSTRAINT "teams_owner_id_users_id_fk";
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "teams" DROP CONSTRAINT "teams_slug_steam_accounts_username_fk";
|
|
||||||
--> statement-breakpoint
|
|
||||||
DROP INDEX "idx_team_slug";--> statement-breakpoint
|
|
||||||
DROP INDEX "idx_game_libraries_owner_id";--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" DROP CONSTRAINT "game_libraries_base_game_id_owner_id_pk";--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" ALTER COLUMN "last_played" DROP NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" ADD CONSTRAINT "game_libraries_base_game_id_owner_steam_id_pk" PRIMARY KEY("base_game_id","owner_steam_id");--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" ADD CONSTRAINT "game_libraries_owner_steam_id_steam_accounts_id_fk" FOREIGN KEY ("owner_steam_id") REFERENCES "public"."steam_accounts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
ALTER TABLE "teams" ADD CONSTRAINT "teams_owner_steam_id_steam_accounts_id_fk" FOREIGN KEY ("owner_steam_id") REFERENCES "public"."steam_accounts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
||||||
CREATE INDEX "idx_game_libraries_owner_id" ON "game_libraries" USING btree ("owner_steam_id");--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" DROP COLUMN "time_acquired";--> statement-breakpoint
|
|
||||||
ALTER TABLE "game_libraries" DROP COLUMN "is_family_shared";--> statement-breakpoint
|
|
||||||
ALTER TABLE "steam_accounts" DROP COLUMN "username";--> statement-breakpoint
|
|
||||||
ALTER TABLE "teams" DROP COLUMN "slug";
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
ALTER TYPE "public"."category_type" ADD VALUE 'category';--> statement-breakpoint
|
|
||||||
ALTER TYPE "public"."category_type" ADD VALUE 'franchise';
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
ALTER TABLE "public"."categories" ALTER COLUMN "type" SET DATA TYPE text;--> statement-breakpoint
|
|
||||||
ALTER TABLE "public"."games" ALTER COLUMN "type" SET DATA TYPE text;--> statement-breakpoint
|
|
||||||
DROP TYPE "public"."category_type";--> statement-breakpoint
|
|
||||||
CREATE TYPE "public"."category_type" AS ENUM('tag', 'genre', 'publisher', 'developer', 'categorie', 'franchise');--> statement-breakpoint
|
|
||||||
ALTER TABLE "public"."categories" ALTER COLUMN "type" SET DATA TYPE "public"."category_type" USING "type"::"public"."category_type";--> statement-breakpoint
|
|
||||||
ALTER TABLE "public"."games" ALTER COLUMN "type" SET DATA TYPE "public"."category_type" USING "type"::"public"."category_type";
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
ALTER TABLE "base_games" ALTER COLUMN "description" DROP NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE "base_games" ADD COLUMN "links" text[];
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
ALTER TABLE "base_games" ALTER COLUMN "links" SET DATA TYPE json;
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
DROP TABLE "members" CASCADE;--> statement-breakpoint
|
|
||||||
DROP TABLE "teams" CASCADE;--> statement-breakpoint
|
|
||||||
DROP TYPE "public"."member_role";
|
|
||||||
@@ -1,294 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "f09034df-208a-42b3-b61f-f842921c6e24",
|
|
||||||
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
||||||
"version": "7",
|
|
||||||
"dialect": "postgresql",
|
|
||||||
"tables": {
|
|
||||||
"public.member": {
|
|
||||||
"name": "member",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"time_seen": {
|
|
||||||
"name": "time_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_global": {
|
|
||||||
"name": "email_global",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"member_email": {
|
|
||||||
"name": "member_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"member_team_id_id_pk": {
|
|
||||||
"name": "member_team_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"team_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.team": {
|
|
||||||
"name": "team",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"plan_type": {
|
|
||||||
"name": "plan_type",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"team_slug": {
|
|
||||||
"name": "team_slug",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "slug",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.user": {
|
|
||||||
"name": "user",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"discriminator": {
|
|
||||||
"name": "discriminator",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"polar_customer_id": {
|
|
||||||
"name": "polar_customer_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"flags": {
|
|
||||||
"name": "flags",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"default": "'{}'::json"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"user_email": {
|
|
||||||
"name": "user_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"user_polar_customer_id_unique": {
|
|
||||||
"name": "user_polar_customer_id_unique",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"polar_customer_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enums": {},
|
|
||||||
"schemas": {},
|
|
||||||
"sequences": {},
|
|
||||||
"roles": {},
|
|
||||||
"policies": {},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,294 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "6f428226-b5d8-4182-a676-d04f842f9ded",
|
|
||||||
"prevId": "f09034df-208a-42b3-b61f-f842921c6e24",
|
|
||||||
"version": "7",
|
|
||||||
"dialect": "postgresql",
|
|
||||||
"tables": {
|
|
||||||
"public.member": {
|
|
||||||
"name": "member",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"time_seen": {
|
|
||||||
"name": "time_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_global": {
|
|
||||||
"name": "email_global",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"member_email": {
|
|
||||||
"name": "member_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"member_team_id_id_pk": {
|
|
||||||
"name": "member_team_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"team_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.team": {
|
|
||||||
"name": "team",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"plan_type": {
|
|
||||||
"name": "plan_type",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "slug",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.user": {
|
|
||||||
"name": "user",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"discriminator": {
|
|
||||||
"name": "discriminator",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"polar_customer_id": {
|
|
||||||
"name": "polar_customer_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"flags": {
|
|
||||||
"name": "flags",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"default": "'{}'::json"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"user_email": {
|
|
||||||
"name": "user_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"user_polar_customer_id_unique": {
|
|
||||||
"name": "user_polar_customer_id_unique",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"polar_customer_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enums": {},
|
|
||||||
"schemas": {},
|
|
||||||
"sequences": {},
|
|
||||||
"roles": {},
|
|
||||||
"policies": {},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,420 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "227c54d2-b643-48d5-964b-af6fe004369a",
|
|
||||||
"prevId": "6f428226-b5d8-4182-a676-d04f842f9ded",
|
|
||||||
"version": "7",
|
|
||||||
"dialect": "postgresql",
|
|
||||||
"tables": {
|
|
||||||
"public.member": {
|
|
||||||
"name": "member",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"time_seen": {
|
|
||||||
"name": "time_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_global": {
|
|
||||||
"name": "email_global",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"member_email": {
|
|
||||||
"name": "member_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"member_team_id_id_pk": {
|
|
||||||
"name": "member_team_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"team_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.steam": {
|
|
||||||
"name": "steam",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"access_token": {
|
|
||||||
"name": "access_token",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"name": "country",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"name": "username",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"persona_name": {
|
|
||||||
"name": "persona_name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"global_steam_email": {
|
|
||||||
"name": "global_steam_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"steam_email": {
|
|
||||||
"name": "steam_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "user_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"steam_user_id_id_pk": {
|
|
||||||
"name": "steam_user_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"user_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.team": {
|
|
||||||
"name": "team",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"plan_type": {
|
|
||||||
"name": "plan_type",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "slug",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.user": {
|
|
||||||
"name": "user",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"discriminator": {
|
|
||||||
"name": "discriminator",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"polar_customer_id": {
|
|
||||||
"name": "polar_customer_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"flags": {
|
|
||||||
"name": "flags",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"default": "'{}'::json"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"user_email": {
|
|
||||||
"name": "user_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"user_polar_customer_id_unique": {
|
|
||||||
"name": "user_polar_customer_id_unique",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"polar_customer_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enums": {},
|
|
||||||
"schemas": {},
|
|
||||||
"sequences": {},
|
|
||||||
"roles": {},
|
|
||||||
"policies": {},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,507 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "eb5d41aa-5f85-4b2d-8633-fc021b211241",
|
|
||||||
"prevId": "227c54d2-b643-48d5-964b-af6fe004369a",
|
|
||||||
"version": "7",
|
|
||||||
"dialect": "postgresql",
|
|
||||||
"tables": {
|
|
||||||
"public.machine": {
|
|
||||||
"name": "machine",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"name": "country",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"timezone": {
|
|
||||||
"name": "timezone",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"location": {
|
|
||||||
"name": "location",
|
|
||||||
"type": "point",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"fingerprint": {
|
|
||||||
"name": "fingerprint",
|
|
||||||
"type": "varchar(32)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"machine_fingerprint": {
|
|
||||||
"name": "machine_fingerprint",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "fingerprint",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.member": {
|
|
||||||
"name": "member",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"time_seen": {
|
|
||||||
"name": "time_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_global": {
|
|
||||||
"name": "email_global",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"member_email": {
|
|
||||||
"name": "member_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"member_team_id_id_pk": {
|
|
||||||
"name": "member_team_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"team_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.steam": {
|
|
||||||
"name": "steam",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"time_seen": {
|
|
||||||
"name": "time_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_game": {
|
|
||||||
"name": "last_game",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"name": "username",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_email": {
|
|
||||||
"name": "steam_email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"persona_name": {
|
|
||||||
"name": "persona_name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"limitation": {
|
|
||||||
"name": "limitation",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"steam_email": {
|
|
||||||
"name": "steam_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "user_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"steam_user_id_id_pk": {
|
|
||||||
"name": "steam_user_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"user_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.team": {
|
|
||||||
"name": "team",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"plan_type": {
|
|
||||||
"name": "plan_type",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "slug",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.user": {
|
|
||||||
"name": "user",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"discriminator": {
|
|
||||||
"name": "discriminator",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"polar_customer_id": {
|
|
||||||
"name": "polar_customer_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"user_email": {
|
|
||||||
"name": "user_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"user_polar_customer_id_unique": {
|
|
||||||
"name": "user_polar_customer_id_unique",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"polar_customer_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enums": {},
|
|
||||||
"schemas": {},
|
|
||||||
"sequences": {},
|
|
||||||
"roles": {},
|
|
||||||
"policies": {},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,499 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "65574f71-e0d3-4363-9449-394e7c376a30",
|
|
||||||
"prevId": "eb5d41aa-5f85-4b2d-8633-fc021b211241",
|
|
||||||
"version": "7",
|
|
||||||
"dialect": "postgresql",
|
|
||||||
"tables": {
|
|
||||||
"public.machine": {
|
|
||||||
"name": "machine",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"name": "country",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"timezone": {
|
|
||||||
"name": "timezone",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"location": {
|
|
||||||
"name": "location",
|
|
||||||
"type": "point",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"fingerprint": {
|
|
||||||
"name": "fingerprint",
|
|
||||||
"type": "varchar(32)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"machine_fingerprint": {
|
|
||||||
"name": "machine_fingerprint",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "fingerprint",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"machine_user_id_id_pk": {
|
|
||||||
"name": "machine_user_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"user_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.member": {
|
|
||||||
"name": "member",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"time_seen": {
|
|
||||||
"name": "time_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_global": {
|
|
||||||
"name": "email_global",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"member_email": {
|
|
||||||
"name": "member_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"member_team_id_id_pk": {
|
|
||||||
"name": "member_team_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"team_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.steam": {
|
|
||||||
"name": "steam",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_seen": {
|
|
||||||
"name": "last_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_game": {
|
|
||||||
"name": "last_game",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"name": "username",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_email": {
|
|
||||||
"name": "steam_email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"persona_name": {
|
|
||||||
"name": "persona_name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"limitation": {
|
|
||||||
"name": "limitation",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {
|
|
||||||
"steam_user_id_user_id_fk": {
|
|
||||||
"name": "steam_user_id_user_id_fk",
|
|
||||||
"tableFrom": "steam",
|
|
||||||
"tableTo": "user",
|
|
||||||
"columnsFrom": [
|
|
||||||
"user_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.team": {
|
|
||||||
"name": "team",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"plan_type": {
|
|
||||||
"name": "plan_type",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "slug",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.user": {
|
|
||||||
"name": "user",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"discriminator": {
|
|
||||||
"name": "discriminator",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"polar_customer_id": {
|
|
||||||
"name": "polar_customer_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"user_email": {
|
|
||||||
"name": "user_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"user_polar_customer_id_unique": {
|
|
||||||
"name": "user_polar_customer_id_unique",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"polar_customer_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enums": {},
|
|
||||||
"schemas": {},
|
|
||||||
"sequences": {},
|
|
||||||
"roles": {},
|
|
||||||
"policies": {},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,485 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "0b04858c-a7e3-43b6-98a4-1dc2f6f97488",
|
|
||||||
"prevId": "65574f71-e0d3-4363-9449-394e7c376a30",
|
|
||||||
"version": "7",
|
|
||||||
"dialect": "postgresql",
|
|
||||||
"tables": {
|
|
||||||
"public.machine": {
|
|
||||||
"name": "machine",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"name": "country",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"timezone": {
|
|
||||||
"name": "timezone",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"location": {
|
|
||||||
"name": "location",
|
|
||||||
"type": "point",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"fingerprint": {
|
|
||||||
"name": "fingerprint",
|
|
||||||
"type": "varchar(32)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"machine_fingerprint": {
|
|
||||||
"name": "machine_fingerprint",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "fingerprint",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.member": {
|
|
||||||
"name": "member",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"time_seen": {
|
|
||||||
"name": "time_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_global": {
|
|
||||||
"name": "email_global",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"member_email": {
|
|
||||||
"name": "member_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"member_team_id_id_pk": {
|
|
||||||
"name": "member_team_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"team_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.steam": {
|
|
||||||
"name": "steam",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_seen": {
|
|
||||||
"name": "last_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_game": {
|
|
||||||
"name": "last_game",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"name": "username",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_email": {
|
|
||||||
"name": "steam_email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"persona_name": {
|
|
||||||
"name": "persona_name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"limitation": {
|
|
||||||
"name": "limitation",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {
|
|
||||||
"steam_user_id_user_id_fk": {
|
|
||||||
"name": "steam_user_id_user_id_fk",
|
|
||||||
"tableFrom": "steam",
|
|
||||||
"tableTo": "user",
|
|
||||||
"columnsFrom": [
|
|
||||||
"user_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.team": {
|
|
||||||
"name": "team",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"plan_type": {
|
|
||||||
"name": "plan_type",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "slug",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.user": {
|
|
||||||
"name": "user",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"discriminator": {
|
|
||||||
"name": "discriminator",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"polar_customer_id": {
|
|
||||||
"name": "polar_customer_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"user_email": {
|
|
||||||
"name": "user_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"user_polar_customer_id_unique": {
|
|
||||||
"name": "user_polar_customer_id_unique",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"polar_customer_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enums": {},
|
|
||||||
"schemas": {},
|
|
||||||
"sequences": {},
|
|
||||||
"roles": {},
|
|
||||||
"policies": {},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,485 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "69827225-1351-4709-a9b2-facb0f569215",
|
|
||||||
"prevId": "0b04858c-a7e3-43b6-98a4-1dc2f6f97488",
|
|
||||||
"version": "7",
|
|
||||||
"dialect": "postgresql",
|
|
||||||
"tables": {
|
|
||||||
"public.machine": {
|
|
||||||
"name": "machine",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"name": "country",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"timezone": {
|
|
||||||
"name": "timezone",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"location": {
|
|
||||||
"name": "location",
|
|
||||||
"type": "point",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"fingerprint": {
|
|
||||||
"name": "fingerprint",
|
|
||||||
"type": "varchar(32)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"machine_fingerprint": {
|
|
||||||
"name": "machine_fingerprint",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "fingerprint",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.member": {
|
|
||||||
"name": "member",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_seen": {
|
|
||||||
"name": "time_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_global": {
|
|
||||||
"name": "email_global",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"member_email": {
|
|
||||||
"name": "member_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"member_team_id_id_pk": {
|
|
||||||
"name": "member_team_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"team_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.steam": {
|
|
||||||
"name": "steam",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_seen": {
|
|
||||||
"name": "last_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_game": {
|
|
||||||
"name": "last_game",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"name": "username",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_email": {
|
|
||||||
"name": "steam_email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"persona_name": {
|
|
||||||
"name": "persona_name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"limitation": {
|
|
||||||
"name": "limitation",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {
|
|
||||||
"steam_user_id_user_id_fk": {
|
|
||||||
"name": "steam_user_id_user_id_fk",
|
|
||||||
"tableFrom": "steam",
|
|
||||||
"tableTo": "user",
|
|
||||||
"columnsFrom": [
|
|
||||||
"user_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.team": {
|
|
||||||
"name": "team",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "slug",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.user": {
|
|
||||||
"name": "user",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"discriminator": {
|
|
||||||
"name": "discriminator",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"polar_customer_id": {
|
|
||||||
"name": "polar_customer_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"user_email": {
|
|
||||||
"name": "user_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"user_polar_customer_id_unique": {
|
|
||||||
"name": "user_polar_customer_id_unique",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"polar_customer_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enums": {},
|
|
||||||
"schemas": {},
|
|
||||||
"sequences": {},
|
|
||||||
"roles": {},
|
|
||||||
"policies": {},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,580 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "fff2b73d-85ab-48bc-86de-69d3caf317f0",
|
|
||||||
"prevId": "69827225-1351-4709-a9b2-facb0f569215",
|
|
||||||
"version": "7",
|
|
||||||
"dialect": "postgresql",
|
|
||||||
"tables": {
|
|
||||||
"public.machine": {
|
|
||||||
"name": "machine",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"name": "country",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"timezone": {
|
|
||||||
"name": "timezone",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"location": {
|
|
||||||
"name": "location",
|
|
||||||
"type": "point",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"fingerprint": {
|
|
||||||
"name": "fingerprint",
|
|
||||||
"type": "varchar(32)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"machine_fingerprint": {
|
|
||||||
"name": "machine_fingerprint",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "fingerprint",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.member": {
|
|
||||||
"name": "member",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_seen": {
|
|
||||||
"name": "time_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_global": {
|
|
||||||
"name": "email_global",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"member_email": {
|
|
||||||
"name": "member_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"member_team_id_id_pk": {
|
|
||||||
"name": "member_team_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"team_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.steam": {
|
|
||||||
"name": "steam",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_seen": {
|
|
||||||
"name": "last_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_game": {
|
|
||||||
"name": "last_game",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"name": "username",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_email": {
|
|
||||||
"name": "steam_email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"persona_name": {
|
|
||||||
"name": "persona_name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"limitation": {
|
|
||||||
"name": "limitation",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {
|
|
||||||
"steam_user_id_user_id_fk": {
|
|
||||||
"name": "steam_user_id_user_id_fk",
|
|
||||||
"tableFrom": "steam",
|
|
||||||
"tableTo": "user",
|
|
||||||
"columnsFrom": [
|
|
||||||
"user_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.subscription": {
|
|
||||||
"name": "subscription",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"standing": {
|
|
||||||
"name": "standing",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"plan_type": {
|
|
||||||
"name": "plan_type",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"tokens": {
|
|
||||||
"name": "tokens",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"product_id": {
|
|
||||||
"name": "product_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"subscription_id": {
|
|
||||||
"name": "subscription_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {
|
|
||||||
"subscription_team_id_team_id_fk": {
|
|
||||||
"name": "subscription_team_id_team_id_fk",
|
|
||||||
"tableFrom": "subscription",
|
|
||||||
"tableTo": "team",
|
|
||||||
"columnsFrom": [
|
|
||||||
"team_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.team": {
|
|
||||||
"name": "team",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "slug",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.user": {
|
|
||||||
"name": "user",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"discriminator": {
|
|
||||||
"name": "discriminator",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"polar_customer_id": {
|
|
||||||
"name": "polar_customer_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"user_email": {
|
|
||||||
"name": "user_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"user_polar_customer_id_unique": {
|
|
||||||
"name": "user_polar_customer_id_unique",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"polar_customer_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enums": {},
|
|
||||||
"schemas": {},
|
|
||||||
"sequences": {},
|
|
||||||
"roles": {},
|
|
||||||
"policies": {},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,619 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "17b9c14f-ff15-44a5-9aaf-3f3b7dd7d294",
|
|
||||||
"prevId": "fff2b73d-85ab-48bc-86de-69d3caf317f0",
|
|
||||||
"version": "7",
|
|
||||||
"dialect": "postgresql",
|
|
||||||
"tables": {
|
|
||||||
"public.machine": {
|
|
||||||
"name": "machine",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"name": "country",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"timezone": {
|
|
||||||
"name": "timezone",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"location": {
|
|
||||||
"name": "location",
|
|
||||||
"type": "point",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"fingerprint": {
|
|
||||||
"name": "fingerprint",
|
|
||||||
"type": "varchar(32)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"machine_fingerprint": {
|
|
||||||
"name": "machine_fingerprint",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "fingerprint",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.member": {
|
|
||||||
"name": "member",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_seen": {
|
|
||||||
"name": "time_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_global": {
|
|
||||||
"name": "email_global",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"member_email": {
|
|
||||||
"name": "member_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"member_team_id_id_pk": {
|
|
||||||
"name": "member_team_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"team_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.steam": {
|
|
||||||
"name": "steam",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_seen": {
|
|
||||||
"name": "last_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_game": {
|
|
||||||
"name": "last_game",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"name": "username",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_email": {
|
|
||||||
"name": "steam_email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"persona_name": {
|
|
||||||
"name": "persona_name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"limitation": {
|
|
||||||
"name": "limitation",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {
|
|
||||||
"steam_user_id_user_id_fk": {
|
|
||||||
"name": "steam_user_id_user_id_fk",
|
|
||||||
"tableFrom": "steam",
|
|
||||||
"tableTo": "user",
|
|
||||||
"columnsFrom": [
|
|
||||||
"user_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.subscription": {
|
|
||||||
"name": "subscription",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"standing": {
|
|
||||||
"name": "standing",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"plan_type": {
|
|
||||||
"name": "plan_type",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"tokens": {
|
|
||||||
"name": "tokens",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"product_id": {
|
|
||||||
"name": "product_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"subscription_id": {
|
|
||||||
"name": "subscription_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"subscription_id": {
|
|
||||||
"name": "subscription_id",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"subscription_user_id": {
|
|
||||||
"name": "subscription_user_id",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "user_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {
|
|
||||||
"subscription_team_id_team_id_fk": {
|
|
||||||
"name": "subscription_team_id_team_id_fk",
|
|
||||||
"tableFrom": "subscription",
|
|
||||||
"tableTo": "team",
|
|
||||||
"columnsFrom": [
|
|
||||||
"team_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"subscription_id_team_id_pk": {
|
|
||||||
"name": "subscription_id_team_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"id",
|
|
||||||
"team_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.team": {
|
|
||||||
"name": "team",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "slug",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.user": {
|
|
||||||
"name": "user",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"discriminator": {
|
|
||||||
"name": "discriminator",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"polar_customer_id": {
|
|
||||||
"name": "polar_customer_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"user_email": {
|
|
||||||
"name": "user_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"user_polar_customer_id_unique": {
|
|
||||||
"name": "user_polar_customer_id_unique",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"polar_customer_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enums": {},
|
|
||||||
"schemas": {},
|
|
||||||
"sequences": {},
|
|
||||||
"roles": {},
|
|
||||||
"policies": {},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,650 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "1717c769-cee0-4242-bcbb-9538c80d985c",
|
|
||||||
"prevId": "17b9c14f-ff15-44a5-9aaf-3f3b7dd7d294",
|
|
||||||
"version": "7",
|
|
||||||
"dialect": "postgresql",
|
|
||||||
"tables": {
|
|
||||||
"public.machine": {
|
|
||||||
"name": "machine",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"name": "country",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"timezone": {
|
|
||||||
"name": "timezone",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"location": {
|
|
||||||
"name": "location",
|
|
||||||
"type": "point",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"fingerprint": {
|
|
||||||
"name": "fingerprint",
|
|
||||||
"type": "varchar(32)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"machine_fingerprint": {
|
|
||||||
"name": "machine_fingerprint",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "fingerprint",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.member": {
|
|
||||||
"name": "member",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_seen": {
|
|
||||||
"name": "time_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"email_global": {
|
|
||||||
"name": "email_global",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"member_email": {
|
|
||||||
"name": "member_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"member_team_id_id_pk": {
|
|
||||||
"name": "member_team_id_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"team_id",
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.steam": {
|
|
||||||
"name": "steam",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_seen": {
|
|
||||||
"name": "last_seen",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_game": {
|
|
||||||
"name": "last_game",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"name": "username",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"country_code": {
|
|
||||||
"name": "country_code",
|
|
||||||
"type": "varchar(2)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"steam_email": {
|
|
||||||
"name": "steam_email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"persona_name": {
|
|
||||||
"name": "persona_name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"limitation": {
|
|
||||||
"name": "limitation",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "steam_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"steam_user_id": {
|
|
||||||
"name": "steam_user_id",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "user_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {
|
|
||||||
"steam_user_id_user_id_fk": {
|
|
||||||
"name": "steam_user_id_user_id_fk",
|
|
||||||
"tableFrom": "steam",
|
|
||||||
"tableTo": "user",
|
|
||||||
"columnsFrom": [
|
|
||||||
"user_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.subscription": {
|
|
||||||
"name": "subscription",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"standing": {
|
|
||||||
"name": "standing",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"plan_type": {
|
|
||||||
"name": "plan_type",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"tokens": {
|
|
||||||
"name": "tokens",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"product_id": {
|
|
||||||
"name": "product_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"subscription_id": {
|
|
||||||
"name": "subscription_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"subscription_id": {
|
|
||||||
"name": "subscription_id",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"subscription_user_id": {
|
|
||||||
"name": "subscription_user_id",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "user_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": false,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {
|
|
||||||
"subscription_team_id_team_id_fk": {
|
|
||||||
"name": "subscription_team_id_team_id_fk",
|
|
||||||
"tableFrom": "subscription",
|
|
||||||
"tableTo": "team",
|
|
||||||
"columnsFrom": [
|
|
||||||
"team_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"subscription_id_team_id_pk": {
|
|
||||||
"name": "subscription_id_team_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"id",
|
|
||||||
"team_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.team": {
|
|
||||||
"name": "team",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "slug",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.user": {
|
|
||||||
"name": "user",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"discriminator": {
|
|
||||||
"name": "discriminator",
|
|
||||||
"type": "integer",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"polar_customer_id": {
|
|
||||||
"name": "polar_customer_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"user_email": {
|
|
||||||
"name": "user_email",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "email",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"user_polar_customer_id_unique": {
|
|
||||||
"name": "user_polar_customer_id_unique",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"polar_customer_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enums": {},
|
|
||||||
"schemas": {},
|
|
||||||
"sequences": {},
|
|
||||||
"roles": {},
|
|
||||||
"policies": {},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,651 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "56a4d60a-c062-47e5-a97e-625443411ad8",
|
|
||||||
"prevId": "1717c769-cee0-4242-bcbb-9538c80d985c",
|
|
||||||
"version": "7",
|
|
||||||
"dialect": "postgresql",
|
|
||||||
"tables": {
|
|
||||||
"public.steam_account_credentials": {
|
|
||||||
"name": "steam_account_credentials",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"refresh_token": {
|
|
||||||
"name": "refresh_token",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"expiry": {
|
|
||||||
"name": "expiry",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"name": "username",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {
|
|
||||||
"steam_account_credentials_steam_id_steam_accounts_steam_id_fk": {
|
|
||||||
"name": "steam_account_credentials_steam_id_steam_accounts_steam_id_fk",
|
|
||||||
"tableFrom": "steam_account_credentials",
|
|
||||||
"tableTo": "steam_accounts",
|
|
||||||
"columnsFrom": [
|
|
||||||
"steam_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"steam_id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.friends_list": {
|
|
||||||
"name": "friends_list",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"friend_steam_id": {
|
|
||||||
"name": "friend_steam_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {
|
|
||||||
"friends_list_steam_id_steam_accounts_steam_id_fk": {
|
|
||||||
"name": "friends_list_steam_id_steam_accounts_steam_id_fk",
|
|
||||||
"tableFrom": "friends_list",
|
|
||||||
"tableTo": "steam_accounts",
|
|
||||||
"columnsFrom": [
|
|
||||||
"steam_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"steam_id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
},
|
|
||||||
"friends_list_friend_steam_id_steam_accounts_steam_id_fk": {
|
|
||||||
"name": "friends_list_friend_steam_id_steam_accounts_steam_id_fk",
|
|
||||||
"tableFrom": "friends_list",
|
|
||||||
"tableTo": "steam_accounts",
|
|
||||||
"columnsFrom": [
|
|
||||||
"friend_steam_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"steam_id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"friends_list_steam_id_friend_steam_id_pk": {
|
|
||||||
"name": "friends_list_steam_id_friend_steam_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"steam_id",
|
|
||||||
"friend_steam_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.members": {
|
|
||||||
"name": "members",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"team_id": {
|
|
||||||
"name": "team_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "member_role",
|
|
||||||
"typeSchema": "public",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"idx_member_steam_id": {
|
|
||||||
"name": "idx_member_steam_id",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "steam_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
},
|
|
||||||
"idx_member_user_id": {
|
|
||||||
"name": "idx_member_user_id",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "team_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"expression": "user_id",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"where": "\"members\".\"user_id\" is not null",
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {
|
|
||||||
"members_user_id_users_id_fk": {
|
|
||||||
"name": "members_user_id_users_id_fk",
|
|
||||||
"tableFrom": "members",
|
|
||||||
"tableTo": "users",
|
|
||||||
"columnsFrom": [
|
|
||||||
"user_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
},
|
|
||||||
"members_steam_id_steam_accounts_steam_id_fk": {
|
|
||||||
"name": "members_steam_id_steam_accounts_steam_id_fk",
|
|
||||||
"tableFrom": "members",
|
|
||||||
"tableTo": "steam_accounts",
|
|
||||||
"columnsFrom": [
|
|
||||||
"steam_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"steam_id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "restrict"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"members_id_team_id_pk": {
|
|
||||||
"name": "members_id_team_id_pk",
|
|
||||||
"columns": [
|
|
||||||
"id",
|
|
||||||
"team_id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.steam_accounts": {
|
|
||||||
"name": "steam_accounts",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"steam_id": {
|
|
||||||
"name": "steam_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"name": "user_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"status": {
|
|
||||||
"name": "status",
|
|
||||||
"type": "steam_status",
|
|
||||||
"typeSchema": "public",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"last_synced_at": {
|
|
||||||
"name": "last_synced_at",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"real_name": {
|
|
||||||
"name": "real_name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"member_since": {
|
|
||||||
"name": "member_since",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"profile_url": {
|
|
||||||
"name": "profile_url",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"name": "username",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"avatar_hash": {
|
|
||||||
"name": "avatar_hash",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"limitations": {
|
|
||||||
"name": "limitations",
|
|
||||||
"type": "json",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {
|
|
||||||
"steam_accounts_user_id_users_id_fk": {
|
|
||||||
"name": "steam_accounts_user_id_users_id_fk",
|
|
||||||
"tableFrom": "steam_accounts",
|
|
||||||
"tableTo": "users",
|
|
||||||
"columnsFrom": [
|
|
||||||
"user_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"idx_steam_username": {
|
|
||||||
"name": "idx_steam_username",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"username"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.teams": {
|
|
||||||
"name": "teams",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"owner_id": {
|
|
||||||
"name": "owner_id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"invite_code": {
|
|
||||||
"name": "invite_code",
|
|
||||||
"type": "varchar(10)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"slug": {
|
|
||||||
"name": "slug",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"max_members": {
|
|
||||||
"name": "max_members",
|
|
||||||
"type": "bigint",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {
|
|
||||||
"idx_team_slug": {
|
|
||||||
"name": "idx_team_slug",
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"expression": "slug",
|
|
||||||
"isExpression": false,
|
|
||||||
"asc": true,
|
|
||||||
"nulls": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"isUnique": true,
|
|
||||||
"concurrently": false,
|
|
||||||
"method": "btree",
|
|
||||||
"with": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"foreignKeys": {
|
|
||||||
"teams_owner_id_users_id_fk": {
|
|
||||||
"name": "teams_owner_id_users_id_fk",
|
|
||||||
"tableFrom": "teams",
|
|
||||||
"tableTo": "users",
|
|
||||||
"columnsFrom": [
|
|
||||||
"owner_id"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
},
|
|
||||||
"teams_slug_steam_accounts_username_fk": {
|
|
||||||
"name": "teams_slug_steam_accounts_username_fk",
|
|
||||||
"tableFrom": "teams",
|
|
||||||
"tableTo": "steam_accounts",
|
|
||||||
"columnsFrom": [
|
|
||||||
"slug"
|
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
|
||||||
"onUpdate": "no action"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"idx_team_invite_code": {
|
|
||||||
"name": "idx_team_invite_code",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"invite_code"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
},
|
|
||||||
"public.users": {
|
|
||||||
"name": "users",
|
|
||||||
"schema": "",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "char(30)",
|
|
||||||
"primaryKey": true,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"time_created": {
|
|
||||||
"name": "time_created",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_updated": {
|
|
||||||
"name": "time_updated",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"default": "now()"
|
|
||||||
},
|
|
||||||
"time_deleted": {
|
|
||||||
"name": "time_deleted",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"avatar_url": {
|
|
||||||
"name": "avatar_url",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
},
|
|
||||||
"last_login": {
|
|
||||||
"name": "last_login",
|
|
||||||
"type": "timestamp with time zone",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
"polar_customer_id": {
|
|
||||||
"name": "polar_customer_id",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"idx_user_email": {
|
|
||||||
"name": "idx_user_email",
|
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"policies": {},
|
|
||||||
"checkConstraints": {},
|
|
||||||
"isRLSEnabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enums": {
|
|
||||||
"public.member_role": {
|
|
||||||
"name": "member_role",
|
|
||||||
"schema": "public",
|
|
||||||
"values": [
|
|
||||||
"child",
|
|
||||||
"adult"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"public.steam_status": {
|
|
||||||
"name": "steam_status",
|
|
||||||
"schema": "public",
|
|
||||||
"values": [
|
|
||||||
"online",
|
|
||||||
"offline",
|
|
||||||
"dnd",
|
|
||||||
"playing"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"schemas": {},
|
|
||||||
"sequences": {},
|
|
||||||
"roles": {},
|
|
||||||
"policies": {},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user