From be651d1b9f3838a5cc4aa79fc6695a07ab06fce3 Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Mon, 26 Jun 2023 22:26:13 +0200 Subject: [PATCH] refactor: remove training property description, add svgIconURL, drop old migration and create new - since app was not deployed yet, i deleted the migration to keep them clean --- content/training/terraform.md | 34 +++++++++++++++++-- lib/content/training.ts | 2 +- .../migration.sql | 2 +- prisma/schema.prisma | 2 +- prisma/seed.ts | 4 +-- 5 files changed, 37 insertions(+), 7 deletions(-) rename prisma/migrations/{20230625133945_ => 20230626200425_training}/migration.sql (95%) diff --git a/content/training/terraform.md b/content/training/terraform.md index 3bd5474..66b8c1e 100644 --- a/content/training/terraform.md +++ b/content/training/terraform.md @@ -2,14 +2,44 @@ id: s448cmvx05lra5mjyu35fdtd # generated via /scripts/cuid.mjs name: Terraform slug: terraform -description: TODO days: 1 weight: 1 draft: false logoURL: https://example.com/logo.png +svgIconURL: https://example.com/icon.svg repositoryURL: https://github.com/vojtechmares/terraform-training priceOpen: 5900 priceCorporate: 24000 --- -TODO +# TODO + +TEST ME + +# DOES IT WORK? + +LOOKS LIKE IT DOES! + +# LETS CHECK OUT LISTS + +- A +- B + +# AND WHAT ABOUT OTHER STUFF? + +- **STRONG** +- *ITALIC* +- [Link](https://google.com/) + +## NESTED + +### HEADINGS + +OK WORK + +> blockquote + +```yaml +code: + block: true +``` diff --git a/lib/content/training.ts b/lib/content/training.ts index 69ee391..a462640 100644 --- a/lib/content/training.ts +++ b/lib/content/training.ts @@ -7,11 +7,11 @@ type Training = { id: string; name: string; slug: string; - description: string; days: number; weight: number; draft?: boolean; logoURL?: string; + svgIconURL?: string; repositoryURL?: string; priceOpen: number; priceCorporate: number; diff --git a/prisma/migrations/20230625133945_/migration.sql b/prisma/migrations/20230626200425_training/migration.sql similarity index 95% rename from prisma/migrations/20230625133945_/migration.sql rename to prisma/migrations/20230626200425_training/migration.sql index e20df73..0281c7a 100644 --- a/prisma/migrations/20230625133945_/migration.sql +++ b/prisma/migrations/20230626200425_training/migration.sql @@ -3,11 +3,11 @@ CREATE TABLE "Training" ( "id" TEXT NOT NULL, "name" TEXT NOT NULL, "slug" TEXT NOT NULL, - "description" TEXT, "days" INTEGER NOT NULL, "weight" INTEGER NOT NULL, "draft" BOOLEAN NOT NULL DEFAULT true, "logoURL" TEXT, + "svgIconURL" TEXT, "repositoryURL" TEXT, "priceOpen" INTEGER NOT NULL, "priceCorporate" INTEGER NOT NULL, diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 586d91f..e98bc8b 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -19,11 +19,11 @@ model Training { id String @id @default(cuid()) name String slug String @unique - description String? days Int weight Int draft Boolean @default(true) logoURL String? + svgIconURL String? repositoryURL String? priceOpen Int priceCorporate Int diff --git a/prisma/seed.ts b/prisma/seed.ts index ce45b38..355651e 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -13,11 +13,11 @@ async function seed() { id: training.metadata.id , name: training.metadata.name, slug: training.metadata.slug, - description: training.metadata.description, days: training.metadata.days, weight: training.metadata.weight, draft: training.metadata.draft, logoURL: training.metadata.logoURL, + svgIconURL: training.metadata.svgIconURL, repositoryURL: training.metadata.repositoryURL, priceOpen: training.metadata.priceOpen, priceCorporate: training.metadata.priceCorporate, @@ -27,11 +27,11 @@ async function seed() { id: training.metadata.id , name: training.metadata.name, slug: training.metadata.slug, - description: training.metadata.description, days: training.metadata.days, weight: training.metadata.weight, draft: training.metadata.draft, logoURL: training.metadata.logoURL, + svgIconURL: training.metadata.svgIconURL, repositoryURL: training.metadata.repositoryURL, priceOpen: training.metadata.priceOpen, priceCorporate: training.metadata.priceCorporate,