diff --git a/prisma/migrations/20220806220043_no_free_comments/migration.sql b/prisma/migrations/20220806220043_no_free_comments/migration.sql new file mode 100644 index 00000000..6545ec52 --- /dev/null +++ b/prisma/migrations/20220806220043_no_free_comments/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "users" ALTER COLUMN "freeComments" SET DEFAULT 0; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 32cd8f11..c07c9b83 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -32,7 +32,7 @@ model User { bioId Int? msats Int @default(0) stackedMsats Int @default(0) - freeComments Int @default(5) + freeComments Int @default(0) freePosts Int @default(2) checkedNotesAt DateTime? tipDefault Int @default(10) @@ -59,6 +59,7 @@ model User { Earn Earn[] Upload Upload[] @relation(name: "Uploads") PollVote PollVote[] + @@index([createdAt]) @@index([inviteId]) @@map(name: "users") @@ -78,6 +79,7 @@ model Upload { userId Int User User[] + @@index([createdAt]) @@index([itemId]) @@index([userId]) @@ -187,6 +189,7 @@ model Item { User User[] PollOption PollOption[] PollVote PollVote[] + @@index([createdAt]) @@index([userId]) @@index([parentId]) @@ -207,6 +210,7 @@ model PollOption { option String PollVote PollVote[] + @@index([itemId]) } @@ -345,6 +349,7 @@ model Withdrawl { msatsFeePaid Int? status WithdrawlStatus? + @@index([createdAt]) @@index([userId]) }