diff --git a/prisma/migrations/20220513132026_auto_excerpt/migration.sql b/prisma/migrations/20220513132026_auto_excerpt/migration.sql deleted file mode 100644 index 3f6573a3..00000000 --- a/prisma/migrations/20220513132026_auto_excerpt/migration.sql +++ /dev/null @@ -1,9 +0,0 @@ -/* - Warnings: - - - Added the required column `autoExcerpt` to the `pages` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE "pages" ADD COLUMN "autoExcerpt" TEXT NOT NULL, -ALTER COLUMN "excerpt" DROP NOT NULL; diff --git a/prisma/migrations/20220513133748_auto_excerpt/migration.sql b/prisma/migrations/20220513133748_auto_excerpt/migration.sql new file mode 100644 index 00000000..087c4607 --- /dev/null +++ b/prisma/migrations/20220513133748_auto_excerpt/migration.sql @@ -0,0 +1,3 @@ +-- AlterTable +ALTER TABLE "pages" ADD COLUMN "autoExcerpt" TEXT, +ALTER COLUMN "excerpt" DROP NOT NULL; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index d306424a..a3cc0817 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -112,7 +112,7 @@ model Page { title String content String excerpt String? - autoExcerpt String + autoExcerpt String? format String @default("markdown") slug String site Site @relation(name: "SitePages", fields: [siteId], references: [id], onDelete: Cascade) diff --git a/src/components/site/SiteHome.tsx b/src/components/site/SiteHome.tsx index d91e49f0..0dacdf96 100644 --- a/src/components/site/SiteHome.tsx +++ b/src/components/site/SiteHome.tsx @@ -9,6 +9,7 @@ export const SiteHome: React.FC<{ return (