uniqueIndex('notif_follow_unique')
.on(table.userId, table.sourceUserId, table.type)
.where(sql`${table.type} = 'FOLLOW'`),
uniqueIndex('notif_like_repost_unique')
.on(table.userId, table.sourceUserId, table.postId, table.type)
.where(sql`${table.type} IN ('LIKE', 'REPOST')`),
uniqueIndex('notif_reply_unique')
.on(table.userId, table.sourceUserId, table.postId, table.replyId, table.type)
.where(sql`${table.type} = 'REPLY'`),
uniqueIndex('notif_follow_unique')
.on(table.userId, table.sourceUserId, table.type)
.where(sql`${table.type} = 'FOLLOW'`),
uniqueIndex('notif_like_repost_unique')
.on(table.userId, table.sourceUserId, table.postId, table.type)
.where(sql`${table.type} IN ('LIKE', 'REPOST')`),
uniqueIndex('notif_reply_unique')
.on(table.userId, table.sourceUserId, table.postId, table.replyId, table.type)
.where(sql`${table.type} = 'REPLY'`),