Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
add description and font-style to the schemia
Browse files Browse the repository at this point in the history
  • Loading branch information
Sboonny committed Mar 13, 2023
1 parent 0aefece commit dbc5fad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions server/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ datasource db {

model instance_settings {
id Int @id
description String?
policy_url String?
terms_of_services_url String?
code_of_conduct_url String?
font_style String?
}

model chapters {
Expand Down
11 changes: 7 additions & 4 deletions server/prisma/seed/factories/instance_settings.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ import { Prisma } from '@prisma/client';

import { prisma } from '../../../src/prisma';

const { internet } = faker;
const { lorem } = faker;

const createInstanceSettings = async () => {
const instanceSettingsData: Prisma.instance_settingsCreateInput = {
id: 1,
policy_url: internet.url(),
terms_of_services_url: internet.url(),
code_of_conduct_url: internet.url(),
description: lorem.paragraphs(2),
policy_url: 'https://www.freecodecamp.org/news/privacy-policy/',
terms_of_services_url:
'https://www.freecodecamp.org/news/terms-of-service/',
code_of_conduct_url: 'https://www.freecodecamp.org/news/code-of-conduct/',
font_style: 'Roboto',
};
await prisma.instance_settings.create({ data: instanceSettingsData });
};
Expand Down
1 change: 0 additions & 1 deletion server/prisma/seed/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ async function seed() {
15,
);
await createInstanceSettings();

await createAttendance(eventIds, userIds);
await setupRoles(
{ ownerId, chapter1AdminId, chapter2AdminId, bannedAdminId, userIds },
Expand Down

0 comments on commit dbc5fad

Please sign in to comment.