-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: π releases new app version
- Loading branch information
Showing
31 changed files
with
999 additions
and
228 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
prisma/migrations/20230122001524_adds_study_session_table/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- CreateTable | ||
CREATE TABLE "StudySession" ( | ||
"userId" TEXT NOT NULL, | ||
"deckId" TEXT NOT NULL, | ||
|
||
CONSTRAINT "StudySession_pkey" PRIMARY KEY ("userId","deckId") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "StudySession_userId_deckId_key" ON "StudySession"("userId", "deckId"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StudySession" ADD CONSTRAINT "StudySession_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StudySession" ADD CONSTRAINT "StudySession_deckId_fkey" FOREIGN KEY ("deckId") REFERENCES "Deck"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
24 changes: 24 additions & 0 deletions
24
prisma/migrations/20230122004801_creates_study_session_box_table/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
Warnings: | ||
- The primary key for the `StudySession` table will be changed. If it partially fails, the table could be left without primary key constraint. | ||
- The required column `id` was added to the `StudySession` table with a prisma-level default value. This is not possible if the table is not empty. Please add this column as optional, then populate it before making it required. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "StudySession" DROP CONSTRAINT "StudySession_pkey", | ||
ADD COLUMN "id" TEXT NOT NULL, | ||
ADD CONSTRAINT "StudySession_pkey" PRIMARY KEY ("id"); | ||
|
||
-- CreateTable | ||
CREATE TABLE "StudySessionBox" ( | ||
"id" TEXT NOT NULL, | ||
"studySessionId" TEXT NOT NULL, | ||
"lastReview" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"reviewGapInHours" INTEGER NOT NULL, | ||
|
||
CONSTRAINT "StudySessionBox_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StudySessionBox" ADD CONSTRAINT "StudySessionBox_studySessionId_fkey" FOREIGN KEY ("studySessionId") REFERENCES "StudySession"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
34 changes: 34 additions & 0 deletions
34
...0230122115502_adds_study_session_attempt_and_created_and_updated_ate_fields/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
-- AlterTable | ||
ALTER TABLE "Card" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP; | ||
|
||
-- AlterTable | ||
ALTER TABLE "StudySession" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP; | ||
|
||
-- AlterTable | ||
ALTER TABLE "StudySessionBox" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP; | ||
|
||
-- AlterTable | ||
ALTER TABLE "Topic" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP; | ||
|
||
-- CreateTable | ||
CREATE TABLE "StudySessionAttempt" ( | ||
"id" TEXT NOT NULL, | ||
"answer" TEXT NOT NULL, | ||
"isRight" BOOLEAN NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"studySessionBoxId" TEXT NOT NULL, | ||
"cardId" TEXT NOT NULL, | ||
|
||
CONSTRAINT "StudySessionAttempt_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StudySessionAttempt" ADD CONSTRAINT "StudySessionAttempt_studySessionBoxId_fkey" FOREIGN KEY ("studySessionBoxId") REFERENCES "StudySessionBox"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StudySessionAttempt" ADD CONSTRAINT "StudySessionAttempt_cardId_fkey" FOREIGN KEY ("cardId") REFERENCES "Card"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
39 changes: 39 additions & 0 deletions
39
prisma/migrations/20230122122528_create_study_session_box_card/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `cardId` on the `StudySessionAttempt` table. All the data in the column will be lost. | ||
- You are about to drop the column `studySessionBoxId` on the `StudySessionAttempt` table. All the data in the column will be lost. | ||
- Added the required column `studySessionBoxCardId` to the `StudySessionAttempt` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "StudySessionAttempt" DROP CONSTRAINT "StudySessionAttempt_cardId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "StudySessionAttempt" DROP CONSTRAINT "StudySessionAttempt_studySessionBoxId_fkey"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "StudySessionAttempt" DROP COLUMN "cardId", | ||
DROP COLUMN "studySessionBoxId", | ||
ADD COLUMN "studySessionBoxCardId" TEXT NOT NULL; | ||
|
||
-- CreateTable | ||
CREATE TABLE "StudySessionBoxCard" ( | ||
"id" TEXT NOT NULL, | ||
"studySessionBoxId" TEXT NOT NULL, | ||
"cardId" TEXT NOT NULL, | ||
|
||
CONSTRAINT "StudySessionBoxCard_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "StudySessionBoxCard_studySessionBoxId_cardId_key" ON "StudySessionBoxCard"("studySessionBoxId", "cardId"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StudySessionBoxCard" ADD CONSTRAINT "StudySessionBoxCard_studySessionBoxId_fkey" FOREIGN KEY ("studySessionBoxId") REFERENCES "StudySessionBox"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StudySessionBoxCard" ADD CONSTRAINT "StudySessionBoxCard_cardId_fkey" FOREIGN KEY ("cardId") REFERENCES "Card"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "StudySessionAttempt" ADD CONSTRAINT "StudySessionAttempt_studySessionBoxCardId_fkey" FOREIGN KEY ("studySessionBoxCardId") REFERENCES "StudySessionBoxCard"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import type { ReactTag } from '@headlessui/react/dist/types' | ||
|
||
export type CardProps = { | ||
children: React.ReactNode | ||
isEditable?: boolean | ||
onDeletePress?: () => void | ||
onEditPress?: () => void | ||
onClick?: () => void | ||
as?: ReactTag | ||
} |
Oops, something went wrong.
0a0e7c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
briskly β ./
briskly-emiliosheinz.vercel.app
brisklyapp.vercel.app
briskly-git-main-emiliosheinz.vercel.app