chore(brand): rename the product to ReplyPier
The upstream project name is gone from code, assets, docs and build
output: brand strings, domains (replypier.site and its app/api/docs/help
subdomains), env prefixes, image and network names, the widget's public
JS API (window.ReplyPier, replypierId/BaseUrl/Config/Token), CSS tokens
(--rp-*), file and directory names, and the WordPress plugin package.
- widget loader is now webclient/replypier.min.js; both bundles rebuilt
from source (backend/assets/widget.{js,css}, frontend/public/webclient)
- NOTICE, llms.txt, CONTRIBUTING, HELP_CENTER_INFRA and config.dev.js
rewritten rather than string-swapped; the demo config no longer ships
the previous vendor's Firebase/Razorpay/Google keys
- new migration replypier_ai_model_001 adds REPLYPIER to the managed
AIModelType and rewrites pre-rename rows
- local compose project, database, role and volume renamed; LOCAL_DEPLOY
documents carrying the old local data over
This commit is contained in:
1 parent
ff0a09f0e5
commit
54b949b392
1156 files changed
+7289
-7144
No files matched your search
@@ -1,9 +1,9 @@
|
||||
---
|
||||
name: write-e2e-test
|
||||
description: Write or change a ChatterMate Playwright end-to-end test (e2e/). Use when adding e2e coverage for a feature, fixing a failing e2e spec, or adding a page object, fixture or fake-LLM script.
|
||||
description: Write or change a ReplyPier Playwright end-to-end test (e2e/). Use when adding e2e coverage for a feature, fixing a failing e2e spec, or adding a page object, fixture or fake-LLM script.
|
||||
---
|
||||
|
||||
# Writing a ChatterMate e2e test
|
||||
# Writing a ReplyPier e2e test
|
||||
|
||||
The suite lives in `e2e/`. Read `e2e/AUTHORING.md` first — it is the source of truth for
|
||||
layout and rules. The essentials:
|
||||
|
||||
+4
-4
@@ -25,13 +25,13 @@ uploads/
|
||||
*.csr.crt
|
||||
/shopify/
|
||||
|
||||
# WordPress plugin source lives in its own repo (chattermate-wordpress-plugin);
|
||||
# WordPress plugin source lives in its own repo (replypier-wordpress-plugin);
|
||||
# only the built, installable zip is tracked here for manual download.
|
||||
/wordpress/*
|
||||
!/wordpress/chattermate-chat.zip
|
||||
!/wordpress/replypier-chat.zip
|
||||
|
||||
# Firebase service account key (contains sensitive credentials)
|
||||
chattermate-13e0a-firebase-adminsdk-7dqo6-57f3de88cb.json
|
||||
*-firebase-adminsdk-*.json
|
||||
|
||||
test.db
|
||||
*.db
|
||||
@@ -71,7 +71,7 @@ config/
|
||||
frontend/.env.*.bak*
|
||||
|
||||
# Stale loader copies — server.js serves the current build from frontend/public/webclient
|
||||
chattermate-test/chattermate.min.js
|
||||
replypier-test/replypier.min.js
|
||||
|
||||
# Only the :dev webclient build emits a sourcemap, and the committed loader is
|
||||
# the :prod one, which does not reference it. Keeps a stray dev artifact out.
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
| PostgreSQL 16 + pgvector | `127.0.0.1:15432` |
|
||||
| Redis | `127.0.0.1:16380` |
|
||||
|
||||
Docker context 为 `colima-bytedesk`,Compose 项目名为 `chattermate-local`,数据库卷为 `chattermate-local_postgres_data`。它们是运行配置,不能为整理名称而改动或删除。Colima 虚拟机承载数据库与缓存,不要单独关闭。
|
||||
Docker context 为 `colima-bytedesk`,Compose 项目名为 `replypier-local`,数据库卷为 `replypier-local_postgres_data`。它们是运行配置,不能为整理名称而改动或删除。Colima 虚拟机承载数据库与缓存,不要单独关闭。
|
||||
|
||||
## 配置与数据保护
|
||||
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
# Contributing to ChatterMate
|
||||
# Contributing to ReplyPier
|
||||
|
||||
Thanks for your interest in contributing! This document explains how to get
|
||||
your changes accepted.
|
||||
|
||||
## License
|
||||
|
||||
The ChatterMate open-source core is licensed under the
|
||||
The ReplyPier open-source core is licensed under the
|
||||
[Apache License 2.0](LICENSE). By contributing, you agree that your
|
||||
contributions will be licensed under Apache-2.0.
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@ RUN npm install
|
||||
|
||||
# Build the application, widget, and webclient. Use the :prod webclient build so
|
||||
# the shipped loader bakes the production fallback URL (the real backend URL is
|
||||
# resolved at runtime via window.chattermateBaseUrl / APP_CONFIG regardless).
|
||||
# resolved at runtime via window.replypierBaseUrl / APP_CONFIG regardless).
|
||||
RUN npm run build-only && \
|
||||
npm run build:widgetdocker && \
|
||||
npm run build:webclient:prod && \
|
||||
if [ ! -f dist/index.html ]; then \
|
||||
echo "<!DOCTYPE html><html><head><meta charset='utf-8'><title>ChatterMate</title><link rel='icon' href='/favicon.ico'></head><body><div id='app'></div><script type='module' src='/src/main.ts'></script></body></html>" > dist/index.html; \
|
||||
echo "<!DOCTYPE html><html><head><meta charset='utf-8'><title>ReplyPier</title><link rel='icon' href='/favicon.ico'></head><body><div id='app'></div><script type='module' src='/src/main.ts'></script></body></html>" > dist/index.html; \
|
||||
fi
|
||||
|
||||
# Production stage
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ RUN git clone https://github.com/pgvector/pgvector.git && \
|
||||
COPY ./backend/scripts/init-vector.sql /docker-entrypoint-initdb.d/
|
||||
|
||||
# Set environment variables
|
||||
ENV POSTGRES_DB=chattermate
|
||||
ENV POSTGRES_DB=replypier
|
||||
ENV POSTGRES_USER=postgres
|
||||
ENV POSTGRES_PASSWORD=postgres
|
||||
|
||||
|
||||
+28
-29
@@ -6,11 +6,10 @@ deploy-time pieces that live **outside** the repo: DNS, TLS and the host
|
||||
nginx on the production VPS. `frontend/nginx.conf` and the docker-compose
|
||||
files need **no changes**.
|
||||
|
||||
> **As deployed on the ChatterMate cloud VPS (2026-07-14):** the base domain is
|
||||
> **`help.chattermate.chat`** (orgs serve at `{slug}.help.chattermate.chat`), not
|
||||
> the `chattermate.help` this doc originally planned — that domain was never
|
||||
> registered, and the org only owns `chattermate.chat`. DNS is **Route53**, so the
|
||||
> wildcard cert is issued and auto-renewed with the `dns-route53` plugin.
|
||||
> **As deployed on the ReplyPier VPS (2026-07-14):** the base domain is
|
||||
> **`help.replypier.site`** (orgs serve at `{slug}.help.replypier.site`). DNS is
|
||||
> **Route53**, so the wildcard cert is issued and auto-renewed with the
|
||||
> `dns-route53` plugin.
|
||||
> Placeholders (`<VPS_IPV4>`, `<ZONE_ID>`, …) stand in for the live values; the
|
||||
> real ones live on the VPS and in ops notes, not in this public repo.
|
||||
|
||||
@@ -18,9 +17,9 @@ files need **no changes**.
|
||||
|
||||
### DNS (Route53)
|
||||
Point a wildcard under the domain you own at the VPS. On the cloud box this is
|
||||
the `chattermate.chat` hosted zone (`<ZONE_ID>`):
|
||||
- `*.help.chattermate.chat. A <VPS_IPV4>`
|
||||
- `*.help.chattermate.chat. AAAA <VPS_IPV6>`
|
||||
the `replypier.site` hosted zone (`<ZONE_ID>`):
|
||||
- `*.help.replypier.site. A <VPS_IPV4>`
|
||||
- `*.help.replypier.site. AAAA <VPS_IPV6>`
|
||||
|
||||
One wildcard record covers every org — no per-org DNS. Create them via the API:
|
||||
```bash
|
||||
@@ -30,7 +29,7 @@ aws route53 change-resource-record-sets --hosted-zone-id <ZONE_ID> \
|
||||
|
||||
Backend env (`backend.env` on the VPS):
|
||||
```
|
||||
HELP_CENTER_BASE_DOMAIN=help.chattermate.chat
|
||||
HELP_CENTER_BASE_DOMAIN=help.replypier.site
|
||||
HELP_CENTER_TARGET_IPS=["<VPS_IPV4>"] # JSON array — see gotcha below
|
||||
```
|
||||
> **Gotcha:** `HELP_CENTER_TARGET_IPS` is a `frozenset` setting, so
|
||||
@@ -46,11 +45,11 @@ Route53 policy (`route53:ListHostedZones` + `GetChange` on `*`,
|
||||
(mode 600) on the box. Issue once:
|
||||
```bash
|
||||
docker run --rm \
|
||||
-v ~/chattermate/certbot/conf:/etc/letsencrypt \
|
||||
-v ~/replypier/certbot/conf:/etc/letsencrypt \
|
||||
-v ~/.aws:/root/.aws:ro \
|
||||
certbot/dns-route53 certonly --dns-route53 \
|
||||
-d '*.help.chattermate.chat' -d 'help.chattermate.chat' \
|
||||
--cert-name help.chattermate.chat \
|
||||
-d '*.help.replypier.site' -d 'help.replypier.site' \
|
||||
--cert-name help.replypier.site \
|
||||
--non-interactive --agree-tos -m <ops-email>
|
||||
```
|
||||
|
||||
@@ -63,7 +62,7 @@ docker compose -f docker-compose.hostinger.yml \
|
||||
# ...then, if the flag file appeared: rm it && docker compose exec -T nginx nginx -s reload
|
||||
```
|
||||
It uses the `certbot/dns-route53` image and mounts
|
||||
`/home/chattermate/.aws:/root/.aws:ro`, so the wildcard renews unattended (the
|
||||
`/home/replypier/.aws:/root/.aws:ro`, so the wildcard renews unattended (the
|
||||
renewal conf remembers `authenticator = dns-route53`). Existing HTTP-01 webroot
|
||||
certs still renew — the dns-route53 image is a superset of `certbot/certbot`.
|
||||
`renew` covers every cert in the shared `certbot/conf`, not just the wildcard.
|
||||
@@ -95,19 +94,19 @@ certs still renew — the dns-route53 image is a superset of `certbot/certbot`.
|
||||
> ```
|
||||
|
||||
### Host nginx server block
|
||||
Lives at `~/chattermate/nginx/conf.d/help-center.conf` (mounted read-only into
|
||||
the `chattermate-nginx-1` container). `proxy_set_header Host $host` is what
|
||||
Lives at `~/replypier/nginx/conf.d/help-center.conf` (mounted read-only into
|
||||
the `replypier-nginx-1` container). `proxy_set_header Host $host` is what
|
||||
makes backend host-dispatch resolve the org. Upstream is the compose service
|
||||
name `backend:8000` (nginx shares the `chattermate-network`), not a published
|
||||
name `backend:8000` (nginx shares the `replypier-network`), not a published
|
||||
host port.
|
||||
|
||||
```nginx
|
||||
# {slug}.help.chattermate.chat
|
||||
# {slug}.help.replypier.site
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name *.help.chattermate.chat help.chattermate.chat;
|
||||
ssl_certificate /etc/letsencrypt/live/help.chattermate.chat/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/help.chattermate.chat/privkey.pem;
|
||||
server_name *.help.replypier.site help.replypier.site;
|
||||
ssl_certificate /etc/letsencrypt/live/help.replypier.site/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/help.replypier.site/privkey.pem;
|
||||
include /etc/nginx/conf.d/ssl-params.conf;
|
||||
|
||||
location / {
|
||||
@@ -121,7 +120,7 @@ server {
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name *.help.chattermate.chat help.chattermate.chat;
|
||||
server_name *.help.replypier.site help.replypier.site;
|
||||
location /.well-known/acme-challenge/ { root /var/www/certbot; }
|
||||
location / { return 301 https://$host$request_uri; }
|
||||
}
|
||||
@@ -130,11 +129,11 @@ server {
|
||||
## 2. Per-customer custom domain (runbook step per domain)
|
||||
|
||||
Customers add two records (shown in their FAQ admin UI). On the cloud box the
|
||||
CNAME target `cname.chattermate.chat` is **not** provisioned, so verification
|
||||
CNAME target `cname.replypier.site` is **not** provisioned, so verification
|
||||
falls back to an A record pointing at `HELP_CENTER_TARGET_IPS` — either form
|
||||
works:
|
||||
- `CNAME help.customer.com → cname.chattermate.chat` *(or)* `A help.customer.com → <VPS_IPV4>`
|
||||
- `TXT _chattermate.help.customer.com → cm-verify=<token>`
|
||||
- `CNAME help.customer.com → cname.replypier.site` *(or)* `A help.customer.com → <VPS_IPV4>`
|
||||
- `TXT _replypier.customer.com → rp-verify=<token>`
|
||||
|
||||
After they click **Verify domain** (DNS checks pass, `ssl_status` becomes
|
||||
`pending`), issue the certificate on the VPS — HTTP-01 works because the
|
||||
@@ -161,10 +160,10 @@ admin endpoint for verified-but-unprovisioned domains and runs
|
||||
whole VPS.
|
||||
|
||||
## 3. Verification checklist after deploy
|
||||
1. `curl -sS -o /dev/null -w '%{http_code}\n' https://<slug>.help.chattermate.chat/` → `200` (and `http://` → `301`).
|
||||
2. `https://<slug>.help.chattermate.chat` in a browser → published FAQs render, widget loads; an article at `/a/<faq-slug>` returns `200`.
|
||||
3. `docker exec chattermate-backend-1 printenv HELP_CENTER_BASE_DOMAIN` → `help.chattermate.chat` (and the backend is `healthy`, not crash-looping on `HELP_CENTER_TARGET_IPS`).
|
||||
4. API unaffected: `https://app.chattermate.chat` / `https://api.chattermate.chat/api/v1/...` still route normally.
|
||||
1. `curl -sS -o /dev/null -w '%{http_code}\n' https://<slug>.help.replypier.site/` → `200` (and `http://` → `301`).
|
||||
2. `https://<slug>.help.replypier.site` in a browser → published FAQs render, widget loads; an article at `/a/<faq-slug>` returns `200`.
|
||||
3. `docker exec replypier-backend-1 printenv HELP_CENTER_BASE_DOMAIN` → `help.replypier.site` (and the backend is `healthy`, not crash-looping on `HELP_CENTER_TARGET_IPS`).
|
||||
4. API unaffected: `https://app.replypier.site` / `https://api.replypier.site/api/v1/...` still route normally.
|
||||
5. `POST /ask` from the page returns an answer and appears in `help_center_queries`.
|
||||
6. `docker ps -a --filter name=certbot` → **empty**. `compose up -d` must not start a
|
||||
certbot container; one that sticks around means the long-running loop entrypoint is
|
||||
@@ -180,7 +179,7 @@ The feature is gated by the `help_center` plan flag, which lives in the
|
||||
- backfill existing plan rows' `features` JSON with the same values;
|
||||
- extend the message-limit check to add the org's period
|
||||
`help_center_queries` count (`HelpCenterQueryRepository.count_for_period`)
|
||||
to the bot-message count when the org runs on the ChatterMate-hosted model.
|
||||
to the bot-message count when the org runs on the ReplyPier-hosted model.
|
||||
|
||||
Until that PR deploys, cloud orgs see the upgrade lock (`plan_allowed:
|
||||
false`); self-hosted/OSS installs are unrestricted immediately.
|
||||
|
||||
+13
-2
@@ -63,8 +63,8 @@ Python 后端、知识库 worker、前端预览服务在宿主机运行;Postgr
|
||||
| Redis | `127.0.0.1:16380` |
|
||||
|
||||
- Docker context:`colima-bytedesk`。
|
||||
- Compose 项目名:`chattermate-local`。
|
||||
- 数据库卷:`chattermate-local_postgres_data`。
|
||||
- Compose 项目名:`replypier-local`。
|
||||
- 数据库卷:`replypier-local_postgres_data`。
|
||||
- 配置:`backend/.env`、`frontend/.env`、`deploy/local/.env`。
|
||||
- 运行文件、日志、构建产物、嵌入模型缓存:`deploy/local/.state/`。
|
||||
- Widget 与演示配置:[test-environment.json](deploy/local/.state/test-environment.json)。
|
||||
@@ -72,6 +72,17 @@ Python 后端、知识库 worker、前端预览服务在宿主机运行;Postgr
|
||||
|
||||
启动脚本使用上述 context、项目名和卷。不要随意改名、删除数据卷或关闭承载数据库的 Colima 虚拟机。
|
||||
|
||||
### 改名后的旧数据(一次性,未执行)
|
||||
|
||||
2026-10-26 品牌统一时,Compose 项目名、数据卷名、库名与库用户从旧名改成 `replypier-local` / `replypier-local_postgres_data` / `replypier` / `replypier`。旧卷里的本机数据不会自动挂到新卷,需要时再搬;全新环境无需处理。
|
||||
|
||||
当时 Colima 未运行,这一步没有执行、也没有验证。要做时先 `./deploy/local/local.sh stop`,再二选一:
|
||||
|
||||
1. 保留旧数据:从旧卷 `pg_dumpall -U <旧用户>` 导出,起新栈后还原到 `replypier` 库,然后把 `backend/.env` 的 `DATABASE_URL` 指向新库。加密字段依赖同一个 `backend/.env` 密钥,换密钥会导致旧密文读不出来。
|
||||
2. 不复用:直接 `local.sh up` 得到空库,重新建管理员与 AI 客服配置。
|
||||
|
||||
不要用复制 PGDATA 的方式搬库:库名和角色名都变了,还需要在数据目录里额外改名。
|
||||
|
||||
恢复数据时须同时保留数据库和 `backend/.env` 中的加密配置,否则加密保存的模型配置及消息可能无法读取。不要覆盖密钥、重置管理员,或将私有环境文件提交和对外分享。
|
||||
|
||||
## 会话权限检查
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
ChatterMate
|
||||
Copyright 2024-2026 ChatterMate
|
||||
ReplyPier
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
This product includes software developed by ChatterMate
|
||||
(https://chattermate.chat).
|
||||
This product is the ReplyPier AI customer-support platform: an AI agent answers
|
||||
first from your own knowledge base, a human takes over in the same conversation,
|
||||
and the visitor can rate the service at the end.
|
||||
|
||||
Licensed under the Apache License, Version 2.0. See the LICENSE file for
|
||||
the full license text.
|
||||
Licensed under the Apache License, Version 2.0. See the LICENSE file for the
|
||||
full license text. Contribution terms are in CONTRIBUTING.md.
|
||||
@@ -1,5 +1,5 @@
|
||||
# Database Configuration
|
||||
DATABASE_URL=postgresql+psycopg://postgres:postgres@db:5432/chattermate
|
||||
DATABASE_URL=postgresql+psycopg://postgres:postgres@db:5432/replypier
|
||||
|
||||
# CORS Configuration add backend url to allow cors from frontend
|
||||
CORS_ORIGINS=["http://localhost:3000","http://localhost:8000"]
|
||||
@@ -61,7 +61,7 @@ ENVIRONMENT=development
|
||||
|
||||
# S3 Configuration
|
||||
S3_FILE_STORAGE=false
|
||||
S3_BUCKET=chattermate-uploads
|
||||
S3_BUCKET=replypier-uploads
|
||||
S3_REGION=us-east-1
|
||||
# Leave both blank on EC2/ECS/EKS to use the attached IAM role — boto3 then
|
||||
# resolves credentials from its default chain. Set them only for static keys;
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
"""Added chattermate AI model
|
||||
"""Added replypier AI model
|
||||
|
||||
Revision ID: 520df92643e3
|
||||
Revises: 85364d188f15
|
||||
@@ -35,7 +35,7 @@ depends_on: Union[str, Sequence[str], None] = None
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
# Create a new temporary type with the new value
|
||||
op.execute("ALTER TYPE aimodeltype ADD VALUE IF NOT EXISTS 'CHATTERMATE'")
|
||||
op.execute("ALTER TYPE aimodeltype ADD VALUE IF NOT EXISTS 'REPLYPIER'")
|
||||
# ### end Alembic commands ###
|
||||
|
||||
def downgrade() -> None:
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -21,7 +21,7 @@ Revises: drop_slack_tables_001
|
||||
Create Date: 2026-07-12
|
||||
|
||||
New feature: AI-generated FAQs reviewed/published by the org and served as a
|
||||
public help center on {slug}.chattermate.help or a verified custom domain.
|
||||
public help center on {slug}.help.replypier.site or a verified custom domain.
|
||||
|
||||
Tables:
|
||||
- faq_generation_jobs: async generate/import jobs (worker + UI polling)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
"""
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
"""Carry the managed AI-model enum value onto its renamed label
|
||||
|
||||
Revision ID: replypier_ai_model_001
|
||||
Revises: widget_key_lookup_001
|
||||
Create Date: 2026-10-26 00:00:00.000000
|
||||
|
||||
The brand rename changed ``AIModelType``'s managed-provider member. Databases
|
||||
created before the rename carry the old label in the ``aimodeltype`` type and in
|
||||
``ai_configs`` rows, so:
|
||||
|
||||
1. add the new label to the type (a no-op on a database created after it), and
|
||||
2. rewrite rows that still point at the old label.
|
||||
|
||||
Fresh databases created from the rewritten ``520df92643e3`` migration never see
|
||||
the old label; both statements are then no-ops.
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = 'replypier_ai_model_001'
|
||||
down_revision: Union[str, None] = 'widget_key_lookup_001'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
# The managed-provider value this project used before the rename. Kept only so
|
||||
# pre-rename rows can be found; nothing reads it at runtime.
|
||||
LEGACY_MANAGED_VALUE = 'CHATTERMATE'
|
||||
MANAGED_VALUE = 'REPLYPIER'
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ADD VALUE cannot be used in the same transaction that references the new
|
||||
# label, so it runs in its own autocommit block.
|
||||
with op.get_context().autocommit_block():
|
||||
op.execute(
|
||||
f"ALTER TYPE aimodeltype ADD VALUE IF NOT EXISTS '{MANAGED_VALUE}'"
|
||||
)
|
||||
op.execute(
|
||||
f"UPDATE ai_configs SET model_type = '{MANAGED_VALUE}' "
|
||||
f"WHERE model_type::text = '{LEGACY_MANAGED_VALUE}'"
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# PostgreSQL cannot drop an enum value; the data rewrite is reversible.
|
||||
op.execute(
|
||||
f"UPDATE ai_configs SET model_type = '{LEGACY_MANAGED_VALUE}' "
|
||||
f"WHERE model_type::text = '{MANAGED_VALUE}'"
|
||||
)
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2024-2026 ChatterMate
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Loaded 100 of 1156 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user