-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed id collumn from int to string. included id in token. !Breakin…
…g Change
- Loading branch information
Showing
7 changed files
with
97 additions
and
29 deletions.
There are no files selected for viewing
2 changes: 0 additions & 2 deletions
2
prisma/migrations/20240313203807_api_token_extended/migration.sql
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
prisma/migrations/20240315064831_api_token_extended/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,13 @@ | ||
/* | ||
Warnings: | ||
- The primary key for the `APIToken` table will be changed. If it partially fails, the table could be left without primary key constraint. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "APIToken" DROP CONSTRAINT "APIToken_pkey", | ||
ADD COLUMN "apiAuthorizationType" JSONB NOT NULL DEFAULT '["PERSONAL"]', | ||
ALTER COLUMN "id" DROP DEFAULT, | ||
ALTER COLUMN "id" SET DATA TYPE TEXT, | ||
ADD CONSTRAINT "APIToken_pkey" PRIMARY KEY ("id"); | ||
DROP SEQUENCE "APIToken_id_seq"; |
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
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
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
73692b2
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.
I've got trouble...
To resolve this error:
apiAuthorizationType
" in database (I used phpPgAdmin)npx prisma migrate resolve --rolled-back "20240315064831_api_token_extended"
npx prisma migrate deploy
npx prisma db seed
After that a piece of output:
73692b2
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.
yes, that is expected as you are deploying multiple times from main branch.
Main is not a release, and the migration files could change, hence the migration error you have.
this error will not occur when updating from 0.5.11 to 0.6.0 release.
73692b2
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.
Thx for clarification.