From 99b21c5e200b166213e86f95ff41c1552ccb52a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Schr=C3=B6ter?= Date: Wed, 29 Nov 2023 11:35:09 +0100 Subject: [PATCH] chore: wip --- playground/README.md | 42 +++++-------------- .../20230627150455_init/migration.sql | 9 ---- .../prisma/migrations/migration_lock.toml | 3 -- playground/prisma/schema.prisma | 2 +- 4 files changed, 11 insertions(+), 45 deletions(-) delete mode 100644 playground/prisma/migrations/20230627150455_init/migration.sql delete mode 100644 playground/prisma/migrations/migration_lock.toml diff --git a/playground/README.md b/playground/README.md index 965a1228c..37f75f906 100644 --- a/playground/README.md +++ b/playground/README.md @@ -1,38 +1,16 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - -## Getting Started - -First, run the development server: +## Database Migration ```bash -npm run dev -# or -yarn dev -# or -pnpm dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. - -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. +# Conntect to db +pscale connect playground --port 3309 -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. +# Push schema changes +pnpm prisma db push -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel +# Create deploy request +pscale deploy-request create playground +``` -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. +### Resources -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +https://planetscale.com/docs/prisma/automatic-prisma-migrations diff --git a/playground/prisma/migrations/20230627150455_init/migration.sql b/playground/prisma/migrations/20230627150455_init/migration.sql deleted file mode 100644 index 98a006abc..000000000 --- a/playground/prisma/migrations/20230627150455_init/migration.sql +++ /dev/null @@ -1,9 +0,0 @@ --- CreateTable -CREATE TABLE `Session` ( - `id` VARCHAR(191) NOT NULL, - `code` TEXT NOT NULL, - `config` TEXT NOT NULL, - `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), - - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/playground/prisma/migrations/migration_lock.toml b/playground/prisma/migrations/migration_lock.toml deleted file mode 100644 index e5a788a7a..000000000 --- a/playground/prisma/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "mysql" \ No newline at end of file diff --git a/playground/prisma/schema.prisma b/playground/prisma/schema.prisma index e262444b9..8002024eb 100644 --- a/playground/prisma/schema.prisma +++ b/playground/prisma/schema.prisma @@ -10,7 +10,7 @@ datasource db { model Session { id String @id @default(cuid()) code String @db.Text - css String @db.Text + css String? @db.Text config String @db.Text createdAt DateTime @default(now()) }