-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ユーザーモデルからemailフィールドを削除し、userEmailモデルを追加して関連するテストを更新しました。 (#526)
- Loading branch information
Showing
11 changed files
with
159 additions
and
91 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -24,7 +24,6 @@ describe("translate関数テスト (geminiのみモック)", () => { | |
const user = await prisma.user.create({ | ||
data: { | ||
userName: "testuser", | ||
email: "[email protected]", | ||
displayName: "testuser", | ||
icon: "testuser", | ||
}, | ||
|
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 |
---|---|---|
|
@@ -21,7 +21,6 @@ describe("UserProfile", () => { | |
data: { | ||
userName: "testuser", | ||
displayName: "Test User", | ||
email: "[email protected]", | ||
icon: "https://example.com/icon.jpg", | ||
profile: "This is a test profile", | ||
pages: { | ||
|
@@ -71,7 +70,6 @@ describe("UserProfile", () => { | |
data: { | ||
userName: "testuser2", | ||
displayName: "Test User2", | ||
email: "[email protected]", | ||
icon: "https://example.com/icon2.jpg", | ||
profile: "This is a test profile2", | ||
}, | ||
|
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 |
---|---|---|
|
@@ -55,7 +55,6 @@ describe("EditPage", () => { | |
data: { | ||
userName: "testuser", | ||
displayName: "Test User", | ||
email: "[email protected]", | ||
icon: "https://example.com/icon.jpg", | ||
profile: "This is a test profile", | ||
pages: { | ||
|
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 |
---|---|---|
|
@@ -16,7 +16,6 @@ describe("processHtmlContent", () => { | |
create: { | ||
id: 10, | ||
userName: "htmltester", | ||
email: "[email protected]", | ||
displayName: "htmltester", | ||
icon: "htmltester", | ||
}, | ||
|
@@ -86,7 +85,6 @@ describe("processHtmlContent", () => { | |
create: { | ||
id: 11, | ||
userName: "htmleditor", | ||
email: "[email protected]", | ||
displayName: "htmleditor", | ||
icon: "htmleditor", | ||
}, | ||
|
@@ -182,7 +180,6 @@ describe("processHtmlContent", () => { | |
create: { | ||
id: 12, | ||
userName: "titleduplicateuser", | ||
email: "[email protected]", | ||
displayName: "titleduplicateuser", | ||
icon: "titleduplicateuser", | ||
}, | ||
|
@@ -268,7 +265,6 @@ describe("processHtmlContent", () => { | |
create: { | ||
id: 13, | ||
userName: "noedit", | ||
email: "[email protected]", | ||
displayName: "noedit", | ||
icon: "noedit", | ||
}, | ||
|
@@ -345,7 +341,6 @@ describe("processHtmlContent", () => { | |
create: { | ||
id: 14, | ||
userName: "imagetester", | ||
email: "[email protected]", | ||
displayName: "imagetester", | ||
icon: "imagetester", | ||
}, | ||
|
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 |
---|---|---|
|
@@ -12,7 +12,6 @@ describe("toggleLike 実際のDB統合テスト", () => { | |
data: { | ||
userName: "testuser", | ||
displayName: "Test User", | ||
email: "[email protected]", | ||
icon: "https://example.com/icon.jpg", | ||
profile: "This is a test profile", | ||
pages: { | ||
|
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `email` on the `users` table. All the data in the column will be lost. | ||
*/ | ||
|
||
|
||
CREATE TABLE "user_emails" ( | ||
"id" SERIAL NOT NULL, | ||
"email" TEXT NOT NULL, | ||
"user_id" INTEGER NOT NULL, | ||
|
||
CONSTRAINT "user_emails_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
INSERT INTO "user_emails" ("email", "user_id") | ||
SELECT "email", "id" | ||
FROM "users" | ||
WHERE "email" IS NOT NULL; | ||
|
||
-- DropIndex | ||
DROP INDEX "users_email_idx"; | ||
|
||
-- DropIndex | ||
DROP INDEX "users_email_key"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "users" DROP COLUMN "email"; | ||
|
||
-- CreateTable | ||
-- CreateIndex | ||
CREATE UNIQUE INDEX "user_emails_email_key" ON "user_emails"("email"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "user_emails_user_id_key" ON "user_emails"("user_id"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "user_emails_user_id_idx" ON "user_emails"("user_id"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "user_emails" ADD CONSTRAINT "user_emails_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
Oops, something went wrong.