Skip to content

Commit

Permalink
Add seed step to migrate script
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsilvestre committed Dec 9, 2023
1 parent 0de4f7c commit 825a23e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 0 additions & 4 deletions app/routes/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { json, redirect } from "@remix-run/node";
import { Form, Link, useActionData, useSearchParams } from "@remix-run/react";
import { useEffect, useRef } from "react";

import { seed } from "prisma/seedScript";
import { prisma } from "~/db.server";
import { verifyLogin } from "~/models/user.server";
import { createUserSession, getUserId } from "~/session.server";
import { safeRedirect, validateEmail } from "~/utils";
Expand All @@ -26,8 +24,6 @@ export const action = async ({ request }: ActionFunctionArgs) => {
const redirectTo = safeRedirect(formData.get("redirectTo"), "/");
const remember = formData.get("remember");

await seed(prisma);

if (!validateEmail(email)) {
return json(
{ errors: { email: "Email is invalid", password: null } },
Expand Down
1 change: 1 addition & 0 deletions scripts/migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ echo 10 >/proc/sys/vm/swappiness
swapon /swapfile
echo 1 >/proc/sys/vm/overcommit_memory
npx prisma migrate deploy
npx prisma db seed

0 comments on commit 825a23e

Please sign in to comment.