feat: publish threshold field on Feed model
This commit is contained in:
parent
bab3759423
commit
6761a9163b
@ -0,0 +1,12 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `published_threshold` to the `Feed` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Feed" ADD COLUMN "message_style_id" INTEGER,
|
||||
ADD COLUMN "published_threshold" TIMESTAMP(3) NOT NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Feed" ADD CONSTRAINT "Feed_message_style_id_fkey" FOREIGN KEY ("message_style_id") REFERENCES "MessageStyle"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
@ -12,17 +12,18 @@ datasource db {
|
||||
}
|
||||
|
||||
model Feed {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
url String
|
||||
guild_id String
|
||||
active Boolean
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
channels Channel[]
|
||||
filters Filter[]
|
||||
message_style MessageStyle? @relation(fields: [message_style_id], references: [id], onDelete: SetNull)
|
||||
message_style_id Int?
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
url String
|
||||
guild_id String
|
||||
active Boolean
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
channels Channel[]
|
||||
filters Filter[]
|
||||
message_style MessageStyle? @relation(fields: [message_style_id], references: [id], onDelete: SetNull)
|
||||
message_style_id Int?
|
||||
published_threshold DateTime
|
||||
|
||||
@@unique([guild_id, name])
|
||||
@@index([guild_id, created_at(sort: Desc)])
|
||||
|
Loading…
x
Reference in New Issue
Block a user