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

LEAN-4081 Backup Table Allow Many With Same ID #173

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@manuscripts/api",
"version": "1.13.10",
"version": "1.13.10-LEAN-4081",
"description": "Manuscripts API server",
"license": "Apache-2.0",
"main": "dist/index",
Expand Down Expand Up @@ -143,4 +143,4 @@
"tsc-watch": "^6.0.0",
"typescript": "4.9.4"
}
}
}
11 changes: 11 additions & 0 deletions prisma/migrations/20241031093413_init/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
Warnings:

- The primary key for the `MigrationBackup` 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 `MigrationBackup` 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 "MigrationBackup" DROP CONSTRAINT "MigrationBackup_pkey",
ADD COLUMN "id" TEXT NOT NULL,
ADD CONSTRAINT "MigrationBackup_pkey" PRIMARY KEY ("id");
3 changes: 2 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ model ManuscriptDoc {
}

model MigrationBackup {
manuscript_model_id String @id @default(uuid())
id String @id @default(uuid())
manuscript_model_id String
user_model_id String
project_model_id String
doc Json
Expand Down