Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update prisma seed #1948

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/twenty-items-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": patch
---

Update seed.ts in prisma in documentation
8 changes: 4 additions & 4 deletions www/src/pages/ar/usage/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ dir: rtl
```

```ts:prisma/seed.ts
import { prisma } from "../src/server/db/client";
import { db } from "../src/server/db/client";

async function main() {
const id = "cl9ebqhxk00003b600tymydho";
await prisma.example.upsert({
await db.example.upsert({
where: {
id,
},
Expand All @@ -59,11 +59,11 @@ async function main() {

main()
.then(async () => {
await prisma.$disconnect();
await db.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
await db.$disconnect();
process.exit(1);
});
```
Expand Down
8 changes: 4 additions & 4 deletions www/src/pages/es/usage/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ La base de datos predeterminada es una base de datos SQLite, que es excelente pa
```

```ts:prisma/seed.ts
import { prisma } from "../src/server/db/client";
import { db } from "../src/server/db/client";

async function main() {
const id = "cl9ebqhxk00003b600tymydho";
await prisma.example.upsert({
await db.example.upsert({
where: {
id,
},
Expand All @@ -56,11 +56,11 @@ async function main() {

main()
.then(async () => {
await prisma.$disconnect();
await db.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
await db.$disconnect();
process.exit(1);
});
```
Expand Down
8 changes: 4 additions & 4 deletions www/src/pages/fr/usage/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ La base de données par défaut est une base de données SQLite, idéale pour le
```

```ts:prisma/seed.ts
import { prisma } from "../src/server/db";
import { db } from "../src/server/db";

async function main() {
const id = "cl9ebqhxk00003b600tymydho";
await prisma.example.upsert({
await db.example.upsert({
where: {
id,
},
Expand All @@ -56,11 +56,11 @@ async function main() {

main()
.then(async () => {
await prisma.$disconnect();
await db.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
await db.$disconnect();
process.exit(1);
});
```
Expand Down
8 changes: 4 additions & 4 deletions www/src/pages/ja/usage/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ NextAuth.js と Prisma を組み合わせて選択すると、`User`, `Session`,
```

```ts:prisma/seed.ts
import { prisma } from "../src/server/db";
import { db } from "../src/server/db";

async function main() {
const id = "cl9ebqhxk00003b600tymydho";
await prisma.example.upsert({
await db.example.upsert({
where: {
id,
},
Expand All @@ -56,11 +56,11 @@ async function main() {

main()
.then(async () => {
await prisma.$disconnect();
await db.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
await db.$disconnect();
process.exit(1);
});
```
Expand Down
8 changes: 4 additions & 4 deletions www/src/pages/no/usage/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Standarddatabasen er en SQLite-database, som er meget godt egnet for utvikling o
```

```ts:prisma/seed.ts
import { prisma } from "../src/server/db/client";
import { db } from "../src/server/db/client";

async function main() {
const id = "cl9ebqhxk00003b600tymydho";
await prisma.example.upsert({
await db.example.upsert({
where: {
id,
},
Expand All @@ -56,11 +56,11 @@ async function main() {

main()
.then(async () => {
await prisma.$disconnect();
await db.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
await db.$disconnect();
process.exit(1);
});
```
Expand Down
8 changes: 4 additions & 4 deletions www/src/pages/pl/usage/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Domyślna baza danych to baza SQLite, która jest znakomita do szybkiego pisania
```

```ts:prisma/seed.ts
import { prisma } from "../src/server/db/client";
import { db } from "../src/server/db/client";

async function main() {
const id = "cl9ebqhxk00003b600tymydho";
await prisma.example.upsert({
await db.example.upsert({
where: {
id,
},
Expand All @@ -56,11 +56,11 @@ async function main() {

main()
.then(async () => {
await prisma.$disconnect();
await db.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
await db.$disconnect();
process.exit(1);
});
```
Expand Down
8 changes: 4 additions & 4 deletions www/src/pages/pt/usage/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ O banco de dados padrão é um banco de dados SQLite, que é ótimo para desenvo
```

```ts:prisma/seed.ts
import { prisma } from "../src/server/db/client";
import { db } from "../src/server/db/client";

async function main() {
const id = "cl9ebqhxk00003b600tymydho";
await prisma.example.upsert({
await db.example.upsert({
where: {
id,
},
Expand All @@ -56,11 +56,11 @@ async function main() {

main()
.then(async () => {
await prisma.$disconnect();
await db.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
await db.$disconnect();
process.exit(1);
});
```
Expand Down
8 changes: 4 additions & 4 deletions www/src/pages/ru/usage/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Prisma это ORM для TypeScript, который позволяет опре
```

```ts:prisma/seed.ts
import { prisma } from "../src/server/db";
import { db } from "../src/server/db";

async function main() {
const id = "cl9ebqhxk00003b600tymydho";
await prisma.example.upsert({
await db.example.upsert({
where: {
id,
},
Expand All @@ -56,11 +56,11 @@ async function main() {

main()
.then(async () => {
await prisma.$disconnect();
await db.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
await db.$disconnect();
process.exit(1);
});
```
Expand Down
8 changes: 4 additions & 4 deletions www/src/pages/uk/usage/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Prisma це ORM для TypeScript, який дозволяє визначати
```

```ts:prisma/seed.ts
import { prisma } from "../src/server/db";
import { db } from "../src/server/db";

async function main() {
const id = "cl9ebqhxk00003b600tymydho";
await prisma.example.upsert({
await db.example.upsert({
where: {
id,
},
Expand All @@ -56,11 +56,11 @@ async function main() {

main()
.then(async () => {
await prisma.$disconnect();
await db.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
await db.$disconnect();
process.exit(1);
});
```
Expand Down
8 changes: 4 additions & 4 deletions www/src/pages/zh-hans/usage/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Prisma 客户端位于文件 `/server/db.ts`, 以全局变量被初始化(
```

```ts:prisma/seed.ts
import { prisma } from "../src/server/db";
import { db } from "../src/server/db";

async function main() {
const id = "cl9ebqhxk00003b600tymydho";
await prisma.example.upsert({
await db.example.upsert({
where: {
id,
},
Expand All @@ -56,11 +56,11 @@ async function main() {

main()
.then(async () => {
await prisma.$disconnect();
await db.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
await db.$disconnect();
process.exit(1);
});
```
Expand Down