Skip to content

Instantly share code, notes, and snippets.

@shriharip
Created August 29, 2023 16:46
Show Gist options
  • Save shriharip/bb5aa05e0bfa909b386273d311dba126 to your computer and use it in GitHub Desktop.
Save shriharip/bb5aa05e0bfa909b386273d311dba126 to your computer and use it in GitHub Desktop.
wordpress db in prisma schema
datasource db {
provider = "mysql"
url = "mysql://exampleuser:examplepass@localhost:2234/exampledb"
}
model WpComment {
comment_ID Int @id
commentAgent String @map("comment_agent")
commentApproved String @map("comment_approved")
commentAuthorEmail String @map("comment_author_email")
commentAuthorIP String @map("comment_author_IP")
commentAuthorUrl String @map("comment_author_url")
commentContent String @map("comment_content")
commentDate DateTime @map("comment_date")
commentDateGmt DateTime @map("comment_date_gmt")
commentKarma Int @map("comment_karma")
commentParent Int @map("comment_parent")
commentPostID Int @map("comment_post_ID")
commentType String @map("comment_type")
userId Int @map("user_id")
@@map("wp_comments")
}
model WpCommentmeta {
meta_id Int @id
commentId Int @map("comment_id")
metaKey String? @map("meta_key")
metaValue String? @map("meta_value")
@@map("wp_commentmeta")
}
model WpLink {
link_id Int @id
linkDescription String @map("link_description")
linkImage String @map("link_image")
linkName String @map("link_name")
linkNotes String @map("link_notes")
linkOwner Int @map("link_owner")
linkRating Int @map("link_rating")
linkRel String @map("link_rel")
linkRss String @map("link_rss")
linkTarget String @map("link_target")
linkUpdated DateTime @map("link_updated")
linkUrl String @map("link_url")
linkVisible String @map("link_visible")
@@map("wp_links")
}
model WpOption {
option_id Int @id
autoload String
optionName String @map("option_name") @unique
optionValue String @map("option_value")
@@map("wp_options")
}
model WpPost {
ID Int @id
commentCount Int @map("comment_count")
commentStatus String @map("comment_status")
guid String
menuOrder Int @map("menu_order")
pinged String
pingStatus String @map("ping_status")
postAuthor Int @map("post_author")
postContent String @map("post_content")
postContentFiltered String @map("post_content_filtered")
postDate DateTime @map("post_date")
postDateGmt DateTime @map("post_date_gmt")
postExcerpt String @map("post_excerpt")
postMimeType String @map("post_mime_type")
postModified DateTime @map("post_modified")
postModifiedGmt DateTime @map("post_modified_gmt")
postName String @map("post_name")
postParent Int @map("post_parent")
postPassword String @map("post_password")
postStatus String @map("post_status")
postTitle String @map("post_title")
postType String @map("post_type")
toPing String @map("to_ping")
@@map("wp_posts")
}
model WpPostmeta {
meta_id Int @id
metaKey String? @map("meta_key")
metaValue String? @map("meta_value")
postId Int @map("post_id")
@@map("wp_postmeta")
}
model WpTerm {
term_id Int @id
name String
slug String
termGroup Int @map("term_group")
@@map("wp_terms")
}
model WpTermRelationship {
/// Multiple ID fields (compound indexes) are not supported
object_id Int @id
/// Multiple ID fields (compound indexes) are not supported
term_taxonomy_id Int @id
termOrder Int @map("term_order")
@@map("wp_term_relationships")
}
model WpTermTaxonomy {
term_taxonomy_id Int @id
count Int
description String
parent Int
taxonomy String
termId Int @map("term_id")
@@map("wp_term_taxonomy")
}
model WpTermmeta {
meta_id Int @id
metaKey String? @map("meta_key")
metaValue String? @map("meta_value")
termId Int @map("term_id")
@@map("wp_termmeta")
}
model WpUser {
ID Int @id
displayName String @map("display_name")
userActivationKey String @map("user_activation_key")
userEmail String @map("user_email")
userLogin String @map("user_login")
userNicename String @map("user_nicename")
userPass String @map("user_pass")
userRegistered DateTime @map("user_registered")
userStatus Int @map("user_status")
userUrl String @map("user_url")
@@map("wp_users")
}
model WpUsermeta {
umeta_id Int @id
metaKey String? @map("meta_key")
metaValue String? @map("meta_value")
userId Int @map("user_id")
@@map("wp_usermeta")
}
@shriharip
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment