Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #97

Merged
merged 2 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,4 @@ package-lock.json
/media

.idea/
/prisma-old-site/client/
/db
/db-old
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN yarn prisma generate
#TODO: Remove this line when the old site is removed
RUN yarn prisma generate --schema ./prisma-old-site/schema.prisma
RUN yarn build

##########################
Expand All @@ -37,8 +35,6 @@ RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
#TODO: Remove this line when the old site is removed
COPY --from=builder --chown=nextjs:nodejs /app/prisma-old-site/client/old-db ./prisma-old-site/client/old-db

# Copy logger configs
COPY --chown=nextjs:nodejs next-logger.config.js /app/
Expand Down
265 changes: 0 additions & 265 deletions prisma-old-site/schema.prisma

This file was deleted.

24 changes: 24 additions & 0 deletions prisma/migrations/20240623212002_division_documents/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-- CreateEnum
CREATE TYPE "DocumentType" AS ENUM ('PROTOCOL', 'BUDGET', 'BUSINESS_PLAN', 'FINANCIAL_REPORT', 'BUSINESS_REPORT', 'MISC');

-- CreateTable
CREATE TABLE "DivisionDocument" (
"id" SERIAL NOT NULL,
"divisionGroupId" INTEGER NOT NULL,
"mediaSha256" TEXT NOT NULL,
"titleSv" TEXT NOT NULL,
"titleEn" TEXT NOT NULL,
"descriptionSv" TEXT NOT NULL,
"descriptionEn" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"type" "DocumentType" NOT NULL DEFAULT 'MISC',

CONSTRAINT "DivisionDocument_pkey" PRIMARY KEY ("id")
);

-- AddForeignKey
ALTER TABLE "DivisionDocument" ADD CONSTRAINT "DivisionDocument_divisionGroupId_fkey" FOREIGN KEY ("divisionGroupId") REFERENCES "DivisionGroup"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "DivisionDocument" ADD CONSTRAINT "DivisionDocument_mediaSha256_fkey" FOREIGN KEY ("mediaSha256") REFERENCES "Media"("sha256") ON DELETE RESTRICT ON UPDATE CASCADE;
11 changes: 0 additions & 11 deletions src/actions/migration.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/app/[locale]/post/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export default async function Page({
return (
<main>
<ThreePaneLayout
left={<></>}
middle={<NewsSearchForm locale={locale} />}
right={<ContactCard locale={locale} />}
/>
Expand Down
4 changes: 0 additions & 4 deletions src/app/[locale]/settings/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import SessionService from '@/services/sessionService';
import MigrateButton from '@/components/MigrationButton/MigrateButton';

export default async function Page() {
return (
<main>
<title>Kontrollpanel</title>
<p>There is nothing to see here yet. Please check back later!</p>
{(await SessionService.isAdmin()) && <MigrateButton />}
</main>
);
}
18 changes: 0 additions & 18 deletions src/components/MigrationButton/MigrateButton.tsx

This file was deleted.

Loading
Loading