mirror of
https://github.com/twentyhq/twenty
synced 2026-04-21 13:37:22 +00:00
docs: remove reference to sync metadata (#19400)
This commit is contained in:
parent
137e068ced
commit
54be3b7e87
29 changed files with 1 additions and 319 deletions
|
|
@ -85,7 +85,6 @@ npx nx run twenty-server:test:integration:with-db-reset # Run integration tests
|
|||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/[name] -d src/database/typeorm/core/core.datasource.ts
|
||||
|
||||
# Workspace
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f # Sync metadata
|
||||
```
|
||||
|
||||
## Usage Guidelines
|
||||
|
|
|
|||
|
|
@ -75,9 +75,6 @@ npx nx run twenty-server:database:migrate:prod # Run migrations
|
|||
|
||||
# Generate migration (replace [name] with kebab-case descriptive name)
|
||||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/common/[name] -d src/database/typeorm/core/core.datasource.ts
|
||||
|
||||
# Sync metadata
|
||||
npx nx run twenty-server:command workspace:sync-metadata
|
||||
```
|
||||
|
||||
### Database Inspection (Postgres MCP)
|
||||
|
|
@ -87,7 +84,7 @@ A read-only Postgres MCP server is configured in `.mcp.json`. Use it to:
|
|||
- Verify migration results (columns, types, constraints) after running migrations
|
||||
- Explore the multi-tenant schema structure (core, metadata, workspace-specific schemas)
|
||||
- Debug issues by querying raw data to confirm whether a bug is frontend, backend, or data-level
|
||||
- Inspect metadata tables to debug GraphQL schema generation or `workspace:sync-metadata` issues
|
||||
- Inspect metadata tables to debug GraphQL schema generation issues
|
||||
|
||||
This server is read-only — for write operations (reset, migrations, sync), use the CLI commands above.
|
||||
|
||||
|
|
|
|||
|
|
@ -50,23 +50,6 @@ npx nx run twenty-server:database:reset
|
|||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### For Workspace objects
|
||||
|
||||
There are no migrations files, migration are generated automatically for each workspace,
|
||||
stored in the database, and applied with this command
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
This will drop the database and re-run the migrations and seed.
|
||||
|
||||
Make sure to back up any data you want to keep before running this command.
|
||||
|
||||
</Warning>
|
||||
|
||||
## Tech Stack
|
||||
|
||||
Twenty primarily uses NestJS for the backend.
|
||||
|
|
|
|||
|
|
@ -43,30 +43,6 @@ npx nx run twenty-server:database:reset
|
|||
```
|
||||
|
||||
### عمليات الترحيل
|
||||
|
||||
#### للكائنات داخل مخططات Core/Metadata (TypeORM)
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### لكائنات مساحة العمل
|
||||
|
||||
لا توجد ملفات هجيرات، يتم إنشاء الهجيرات تلقائيًا لكل مساحة عمل،
|
||||
مخزنة في قاعدة البيانات، ويتم تطبيقها مع هذا الأمر
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
سيؤدي هذا إلى إسقاط قاعدة البيانات وإعادة تشغيل الهجرات والبذور.
|
||||
|
||||
تأكد من عمل نسخة احتياطية لأي بيانات تريد الاحتفاظ بها قبل تشغيل هذا الأمر.
|
||||
|
||||
</Warning>
|
||||
|
||||
## "التقنية المستخدمة"
|
||||
|
||||
تستخدم Twenty بشكل أساسي NestJS للواجهة الخلفية.
|
||||
|
|
|
|||
|
|
@ -372,10 +372,8 @@ yarn command:prod upgrade-0.23
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
أمر `yarn database:migrate:prod` سيقوم بتطبيق الترقيات على قاعدة البيانات.
|
||||
الأمر `yarn command:prod workspace:sync-metadata -f` سيزامن تعريف الكائنات القياسية مع جداول البيانات الوصفية ويطبق الترقيات المطلوبة على مساحات العمل الموجودة.
|
||||
الأمر `yarn command:prod upgrade-0.22` سيقوم بتطبيق تحويلات بيانات محددة للتكيف مع الخيارات الافتراضية الجديدة لتوثيق الطلبات في الكائنات.
|
||||
|
|
|
|||
|
|
@ -43,29 +43,6 @@ npx nx run twenty-server:database:reset
|
|||
```
|
||||
|
||||
### Migrace
|
||||
|
||||
#### Pro objekty ve schématech Core/Metadata (TypeORM)
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### Pro objekty Pracovní plochy
|
||||
|
||||
Nejsou žádné soubory migrací, migrace jsou generovány automaticky pro každou pracovní plochu, uloženy v databázi a aplikovány tímto příkazem
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
Tímto se databáze smaže a znovu se spustí migrace a seedování.
|
||||
|
||||
Před spuštěním tohoto příkazu si nezapomeňte zálohovat všechna data, která chcete zachovat.
|
||||
|
||||
</Warning>
|
||||
|
||||
## Technologický stack
|
||||
|
||||
Twenty primárně používá NestJS pro backend.
|
||||
|
|
|
|||
|
|
@ -372,10 +372,8 @@ Spusťte následující příkazy:
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
Příkaz `yarn database:migrate:prod` aplikuje změny na databázi.
|
||||
Příkaz `yarn command:prod workspace:sync-metadata -f` synchronizuje definici standardních objektů s tabulkami metadata a aplikuje nezbytné migrace na existující pracovní prostory.
|
||||
Příkaz `yarn command:prod upgrade-0.22` aplikuje specifické datové transformace pro adaptaci na nové objektové defaultRequestInstrumentationOptions.
|
||||
|
|
|
|||
|
|
@ -43,30 +43,6 @@ npx nx run twenty-server:database:reset
|
|||
```
|
||||
|
||||
### Migrationen
|
||||
|
||||
#### Für Objekte in Core/Metadata-Schemas (TypeORM)
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### Für Arbeitsbereichsobjekte
|
||||
|
||||
Es gibt keine Migrationsdateien, Migrationen werden automatisch für jeden Arbeitsbereich generiert,
|
||||
in der Datenbank gespeichert und mit diesem Befehl angewendet
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
Dadurch wird die Datenbank gelöscht und die Migrationen sowie das Seeding erneut ausgeführt.
|
||||
|
||||
Stellen Sie sicher, dass Sie alle Daten sichern, die Sie aufbewahren möchten, bevor Sie diesen Befehl ausführen.
|
||||
|
||||
</Warning>
|
||||
|
||||
## Technologie-Stack
|
||||
|
||||
Twenty verwendet in erster Linie NestJS für das Backend.
|
||||
|
|
|
|||
|
|
@ -372,10 +372,8 @@ Führen Sie die folgenden Befehle aus:
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
Der `yarn database:migrate:prod`-Befehl wendet die Migrationen auf die Datenbank an.
|
||||
Der Befehl `yarn command:prod workspace:sync-metadata -f` synchronisiert die Definitionen der Standardobjekte mit den Metadaten-Tabellen und wendet erforderliche Migrationen auf bestehende Arbeitsbereiche an.
|
||||
Der Befehl `yarn command:prod upgrade-0.22` führt spezifische Datenumwandlungen durch, um sich an die neuen Objekt-Standardanfrage-Instrumentierungsoptionen anzupassen.
|
||||
|
|
|
|||
|
|
@ -50,20 +50,6 @@ npx nx run twenty-server:database:reset
|
|||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### Para objetos de Workspace
|
||||
|
||||
No hay archivos de migraciones, las migraciones se generan automáticamente para cada espacio de trabajo, se almacenan en la base de datos y se aplican con este comando
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
Esto eliminará la base de datos y volverá a ejecutar las migraciones y semillas.
|
||||
|
||||
Asegúrate de respaldar cualquier dato que desees conservar antes de ejecutar este comando.
|
||||
</Warning>
|
||||
|
||||
## Stack Tecnológico
|
||||
|
||||
Twenty utiliza principalmente NestJS para el backend.
|
||||
|
|
|
|||
|
|
@ -372,10 +372,8 @@ Ejecución de los siguientes comandos:
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
El comando `yarn database:migrate:prod` aplicará las migraciones a la base de datos.
|
||||
El comando `yarn command:prod workspace:sync-metadata -f` sincronizará la definición de objetos estándar a las tablas de metadatos y aplicará las migraciones requeridas a los espacios de trabajo existentes.
|
||||
El comando `yarn command:prod upgrade-0.22` aplicará transformaciones de datos específicas para adaptarse a las nuevas opciones predeterminadas de instrumentación de solicitud de objetos.
|
||||
|
|
|
|||
|
|
@ -43,27 +43,6 @@ npx nx run twenty-server:database:reset
|
|||
```
|
||||
|
||||
### Migrations
|
||||
|
||||
#### Pour les objets dans les schémas Core/Metadata (TypeORM)
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### Pour les objets de l'Espace de travail
|
||||
|
||||
Il n'y a pas de fichiers de migrations, les migrations sont générées automatiquement pour chaque espace de travail, stockées dans la base de données et appliquées avec cette commande
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
Cela supprimera la base de données et réexécutera les migrations et l'initialisation des données.
|
||||
|
||||
Assurez-vous de sauvegarder toutes les données que vous souhaitez conserver avant d'exécuter cette commande.
|
||||
</Warning>
|
||||
|
||||
## Écosystème Tech
|
||||
|
||||
Twenty utilise principalement NestJS pour le backend.
|
||||
|
|
|
|||
|
|
@ -372,10 +372,8 @@ Exécutez les commandes suivantes :
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
La commande `yarn database:migrate:prod` appliquera les migrations à la base de données.
|
||||
La commande `yarn command:prod workspace:sync-metadata -f` synchronisera la définition des objets standard avec les tables de métadonnées et appliquera les migrations nécessaires aux espaces de travail existants.
|
||||
La commande `yarn command:prod upgrade-0.22` appliquera des transformations de données spécifiques pour s’adapter aux nouvelles `defaultRequestInstrumentationOptions` d’objet.
|
||||
|
|
|
|||
|
|
@ -50,22 +50,6 @@ npx nx run twenty-server:database:reset
|
|||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### Per gli oggetti del Workspace
|
||||
|
||||
Non ci sono file di migrazioni; le migrazioni sono generate automaticamente per ogni workspace, memorizzate nel database e applicate con questo comando
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
Questo eliminerà il database e rieseguirà le migrazioni e il popolamento dei dati.
|
||||
|
||||
Assicurati di eseguire il backup dei dati che vuoi mantenere prima di eseguire questo comando.
|
||||
|
||||
</Warning>
|
||||
|
||||
## Tech Stack
|
||||
|
||||
Twenty utilizza principalmente NestJS per il backend.
|
||||
|
|
|
|||
|
|
@ -372,10 +372,8 @@ Esegui i seguenti comandi:
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
Il comando `yarn database:migrate:prod` applicherà le migrazioni al database.
|
||||
Il comando `yarn command:prod workspace:sync-metadata -f` sincronizzerà la definizione degli oggetti standard nelle tabelle dei metadati e applicherà le migrazioni necessarie agli spazi di lavoro esistenti.
|
||||
Il comando `yarn command:prod upgrade-0.22` applicherà specifiche trasformazioni dei dati per adattarsi alle nuove opzioni di strumentazione richiesta predefinita dell'oggetto.
|
||||
|
|
|
|||
|
|
@ -48,28 +48,6 @@ npx nx run twenty-server:database:reset
|
|||
```
|
||||
|
||||
### マイグレーション
|
||||
|
||||
#### Core/Metadata スキーマ (TypeORM) のオブジェクトに対して
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### ワークスペースオブジェクトに対して
|
||||
|
||||
マイグレーションファイルはなく、それぞれのワークスペースに対して自動的に生成され、
|
||||
データベースに保存され、このコマンドで適用されます。
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
これによりデータベースが削除され、マイグレーションとシードが再実行されます。
|
||||
|
||||
このコマンドを実行する前に、保持したいデータをバックアップしてください。
|
||||
</Warning>
|
||||
|
||||
## 技術スタック
|
||||
|
||||
Twenty は主にバックエンドに NestJS を使用しています。
|
||||
|
|
|
|||
|
|
@ -270,7 +270,6 @@ yarn command:prod upgrade-0.33
|
|||
`yarn database:migrate:prod` コマンドはデータベース構造(コアおよびメタデータスキーマ)の移行を適用します
|
||||
`yarn command:prod upgrade-0.33` はすべてのワークスペースのデータ移行を行います。
|
||||
`yarn database:migrate:prod` コマンドはデータベースへの移行を適用します。
|
||||
"`yarn command:prod workspace:sync-metadata -f` コマンドは、標準オブジェクトの定義をメタデータテーブルに同期し、既存のワークスペースに必要な移行を適用します。"
|
||||
The `yarn command:prod upgrade-0.22` command will apply specific data transformations to adapt to the new object defaultRequestInstrumentationOptions.
|
||||
|
||||
このバージョンから、DB用のtwenty-postgresイメージは廃止され、twenty-postgres-spiloが代わりに使用されるようになりました。
|
||||
|
|
@ -389,11 +388,9 @@ Twentyインスタンスをv0.22.0イメージにアップグレードします
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
`yarn database:migrate:prod` コマンドはデータベースへの移行を適用します。
|
||||
`yarn command:prod upgrade-0.23` は、アクティビティをタスク/ノートに移行するなど、データ移行を担当します。
|
||||
"`yarn command:prod workspace:sync-metadata -f` コマンドは、標準オブジェクトの定義をメタデータテーブルに同期し、既存のワークスペースに必要な移行を適用します。"
|
||||
`yarn command:prod upgrade-0.22` コマンドは、新しいオブジェクトの defaultRequestInstrumentationOptions に適合させるため、特定のデータ変換を適用します。
|
||||
|
|
|
|||
|
|
@ -43,27 +43,6 @@ npx nx run twenty-server:database:reset
|
|||
```
|
||||
|
||||
### 마이그레이션
|
||||
|
||||
#### Core/Metadata 스키마의 객체용 (TypeORM)
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### 워크스페이스 객체용
|
||||
|
||||
마이그레이션 파일이 없으며, 각 작업 공간에 대해 자동 생성되고 데이터베이스에 저장되어 이 명령으로 적용됩니다.
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
이 작업은 데이터베이스를 삭제하고 마이그레이션과 시드를 다시 실행합니다.
|
||||
|
||||
이 명령을 실행하기 전에 유지하고 싶은 데이터를 백업하십시오.
|
||||
</Warning>
|
||||
|
||||
## 기술 스택
|
||||
|
||||
Twenty는 주로 NestJS를 백엔드에 사용합니다.
|
||||
|
|
|
|||
|
|
@ -365,10 +365,8 @@ Twenty 인스턴스를 v0.22.0 이미지로 업그레이드하십시오.
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
`yarn database:migrate:prod` 명령은 데이터베이스에 마이그레이션을 적용합니다.
|
||||
`yarn command:prod workspace:sync-metadata -f` 명령은 표준 객체의 정의를 메타데이터 테이블에 동기화하고 기존 워크스페이스에 필요한 마이그레이션을 적용합니다.
|
||||
`yarn command:prod upgrade-0.22` 명령은 새 객체 defaultRequestInstrumentationOptions에 적응하기 위한 특정 데이터 변환을 적용합니다.
|
||||
|
|
|
|||
|
|
@ -50,22 +50,6 @@ npx nx run twenty-server:database:reset
|
|||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### For Workspace objects
|
||||
|
||||
Não há arquivos de migração, as migrações são geradas automaticamente para cada espaço de trabalho, armazenadas no banco de dados e aplicadas com este comando
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
Isso excluirá o banco de dados e reexecutará as migrações e seeds.
|
||||
|
||||
Certifique-se de fazer backup de todos os dados que deseja manter antes de executar este comando.
|
||||
|
||||
</Warning>
|
||||
|
||||
## Pilha de Tecnologias
|
||||
|
||||
O Twenty usa principalmente NestJS para o backend.
|
||||
|
|
|
|||
|
|
@ -372,10 +372,8 @@ Execute os seguintes comandos:
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
O comando `yarn database:migrate:prod` aplicará as migrações ao Banco de Dados.
|
||||
O comando `yarn command:prod workspace:sync-metadata -f` sincronizará a definição de objetos padrão com as tabelas de metadados e aplicará as migrações necessárias aos espaços de trabalho existentes.
|
||||
O comando `yarn command:prod upgrade-0.22` aplicará transformações de dados específicas para se adaptar às novas opções padrão de requestInstrumentationOptions do objeto.
|
||||
|
|
|
|||
|
|
@ -50,23 +50,6 @@ npx nx run twenty-server:database:reset
|
|||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### Pentru obiectele din Workspace
|
||||
|
||||
Nu există fișiere de migrație, migrația este generată automat pentru fiecare spațiu de lucru,
|
||||
este stocată în baza de date și aplicată cu această comandă
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
Acest lucru va elimina baza de date și va relansa migrațiile și seed-urile.
|
||||
|
||||
Asigură-te că faci un backup pentru orice date pe care dorești să le păstrezi înainte de a rula această comandă.
|
||||
|
||||
</Warning>
|
||||
|
||||
## Tehnologii Utilizate
|
||||
|
||||
Twenty folosește în principal NestJS pentru backend.
|
||||
|
|
|
|||
|
|
@ -372,10 +372,8 @@ Rulați următoarele comenzi:
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
Comanda `yarn database:migrate:prod` va aplica migrațiile pe baza de date.
|
||||
Comanda `yarn command:prod workspace:sync-metadata -f` va sincroniza definiția obiectelor standard cu tabelele de metadate și va aplica migrațiile necesare în spațiile de lucru existente.
|
||||
Comanda `yarn command:prod upgrade-0.22` va aplica transformări specifice de date pentru a se adapta la noile opțiuni defaultRequestInstrumentationOptions ale obiectului.
|
||||
|
|
|
|||
|
|
@ -43,30 +43,6 @@ npx nx run twenty-server:database:reset
|
|||
```
|
||||
|
||||
### Миграции
|
||||
|
||||
#### Для объектов в схемах Core/Metadata (TypeORM)
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### Для объектов Рабочего пространства
|
||||
|
||||
Файлов миграций нет, миграции создаются автоматически для каждого рабочего пространства,
|
||||
хранятся в базе данных и применяются этой командой
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
Это удалит базу данных, переустановит миграции и семена.
|
||||
|
||||
Убедитесь, что создали резервную копию данных, которые хотите сохранить, прежде чем выполнять эту команду.
|
||||
|
||||
</Warning>
|
||||
|
||||
## Технологический стек
|
||||
|
||||
Для работы с серверной частью Twenty в основном использует NestJS.
|
||||
|
|
|
|||
|
|
@ -372,10 +372,8 @@ yarn command:prod upgrade-0.23
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
Команда `yarn database:migrate:prod` применяет миграции к Базе данных.
|
||||
Команда `yarn command:prod workspace:sync-metadata -f` синхронизирует определение стандартных объектов с таблицами метаданных и применит необходимые миграции к существующим рабочим пространствам.
|
||||
Команда `yarn command:prod upgrade-0.22` выполнит преобразование данных для адаптации к новым параметрам по умолчанию объекта defaultRequestInstrumentationOptions.
|
||||
|
|
|
|||
|
|
@ -43,30 +43,6 @@ npx nx run twenty-server:database:reset
|
|||
```
|
||||
|
||||
### Geçişler
|
||||
|
||||
#### Core/Metadata şemalarında (TypeORM) nesneler için
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### Çalışma Alanı Nesneleri İçin
|
||||
|
||||
Çalışma alanı için geçiş dosyaları yoktur; her çalışma alanı için otomatik olarak oluşturulur,
|
||||
veritabanında depolanır ve bu komut ile uygulanır.
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
Bu işlem veritabanını siler, migrasyonları ve tohumlamayı yeniden çalıştırır.
|
||||
|
||||
Bu komutu çalıştırmadan önce saklamak istediğiniz verileri yedeklediğinizden emin olun.
|
||||
|
||||
</Warning>
|
||||
|
||||
## Teknoloji Yığını
|
||||
|
||||
Twenty, arka uç için öncelikle NestJS kullanır.
|
||||
|
|
|
|||
|
|
@ -365,10 +365,8 @@ Aşağıdaki komutları çalıştırın:
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
`yarn database:migrate:prod` komutu veritabanı yapısına göçleri uygular.
|
||||
`yarn command:prod workspace:sync-metadata -f` komutu, standart nesnelerin tanımını meta veri tablolarıyla eşitleyecek ve mevcut çalışma alanlarına gerekli geçişleri uygulayacaktır.
|
||||
`yarn command:prod upgrade-0.22` komutu, yeni nesnenin defaultRequestInstrumentationOptions değerine uyum sağlamak için belirli veri dönüşümlerini uygulayacaktır.
|
||||
|
|
|
|||
|
|
@ -43,30 +43,6 @@ npx nx run twenty-server:database:reset
|
|||
```
|
||||
|
||||
### 迁移
|
||||
|
||||
#### 适用于 Core/Metadata 模式中的对象 (TypeORM)
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||||
```
|
||||
|
||||
#### 用于工作区对象
|
||||
|
||||
没有迁移文件,每个工作区的迁移都是自动生成的,
|
||||
储存在数据库中,并通过该命令应用
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||||
```
|
||||
|
||||
<Warning>
|
||||
|
||||
这将删除数据库,并重新运行迁移和预置数据。
|
||||
|
||||
在运行此命令之前,请确保备份任何想要保留的数据。
|
||||
|
||||
</Warning>
|
||||
|
||||
## 技术栈
|
||||
|
||||
Twenty 主要使用 NestJS 作为后端。
|
||||
|
|
|
|||
|
|
@ -372,10 +372,8 @@ yarn command:prod upgrade-0.23
|
|||
|
||||
```
|
||||
yarn database:migrate:prod
|
||||
yarn command:prod workspace:sync-metadata -f
|
||||
yarn command:prod upgrade-0.22
|
||||
```
|
||||
|
||||
`yarn database:migrate:prod` 命令将迁移应用于数据库。
|
||||
该 `yarn command:prod workspace:sync-metadata -f` 命令将把标准对象的定义同步到元数据表,并将所需的迁移应用到现有工作区。
|
||||
该 `yarn command:prod upgrade-0.22` 命令将应用特定的数据转换,以适配新的对象 defaultRequestInstrumentationOptions。
|
||||
|
|
|
|||
Loading…
Reference in a new issue