updated migration file
This commit is contained in:
parent
2177f12b9b
commit
a56b8e24da
|
@ -67,7 +67,7 @@ export default async function getLink(userId: number, body: string) {
|
|||
query.searchQuery && query.searchFilter?.name
|
||||
? query.searchQuery
|
||||
: undefined,
|
||||
mode: POSTGRES_IS_ENABLED ? "insensitive" : undefined
|
||||
mode: POSTGRES_IS_ENABLED ? "insensitive" : undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -76,7 +76,7 @@ export default async function getLink(userId: number, body: string) {
|
|||
query.searchQuery && query.searchFilter?.url
|
||||
? query.searchQuery
|
||||
: undefined,
|
||||
mode: POSTGRES_IS_ENABLED ? "insensitive" : undefined
|
||||
mode: POSTGRES_IS_ENABLED ? "insensitive" : undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ export default async function getLink(userId: number, body: string) {
|
|||
query.searchQuery && query.searchFilter?.description
|
||||
? query.searchQuery
|
||||
: undefined,
|
||||
mode: POSTGRES_IS_ENABLED ? "insensitive" : undefined
|
||||
mode: POSTGRES_IS_ENABLED ? "insensitive" : undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -101,7 +101,9 @@ export default async function getLink(userId: number, body: string) {
|
|||
query.searchQuery && query.searchFilter?.tags
|
||||
? {
|
||||
contains: query.searchQuery,
|
||||
mode: POSTGRES_IS_ENABLED ? "insensitive" : undefined
|
||||
mode: POSTGRES_IS_ENABLED
|
||||
? "insensitive"
|
||||
: undefined,
|
||||
}
|
||||
: undefined,
|
||||
OR: [
|
||||
|
@ -115,7 +117,9 @@ export default async function getLink(userId: number, body: string) {
|
|||
query.searchFilter?.tags
|
||||
? query.searchQuery
|
||||
: undefined,
|
||||
mode: POSTGRES_IS_ENABLED ? "insensitive" : undefined
|
||||
mode: POSTGRES_IS_ENABLED
|
||||
? "insensitive"
|
||||
: undefined,
|
||||
},
|
||||
collection: {
|
||||
members: {
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `whitelistedUsers` on the `User` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "User" DROP COLUMN "whitelistedUsers";
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "WhitelistedUser" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"username" TEXT NOT NULL DEFAULT '',
|
||||
"userId" INTEGER,
|
||||
|
||||
CONSTRAINT "WhitelistedUser_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "WhitelistedUser" ADD CONSTRAINT "WhitelistedUser_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
Ŝarĝante…
Reference in New Issue