Database Schema

Complete reference for all 21 database tables in Scriptlog. All tables use utf8mb4 charset and InnoDB engine.

Home / Documentation / Database Schema
Note: All tables use utf8mb4 charset and InnoDB engine.

tbl_users

User accounts and authentication.

Column Type Description
IDBIGINTPrimary key
user_loginVARCHAR(60)Unique username
user_emailVARCHAR(100)Unique email
user_passVARCHAR(255)Password hash
user_levelVARCHAR(20)Role (administrator, manager, editor, author, contributor, subscriber)
user_fullnameVARCHAR(120)Display name
user_urlVARCHAR(100)Website URL
user_registereddatetimeRegistration date
user_activation_keyVARCHAR(255)Activation token
user_sessionVARCHAR(255)Session identifier
user_bannedTINYINTBan status (0/1)
user_signin_countINTLogin count
user_locked_untilDATETIMEAccount lock expiry

tbl_posts

Blog posts and pages.

Column Type Description
IDBIGINTPrimary key
media_idBIGINTFeatured image
post_authorBIGINTAuthor ID (FK to tbl_users)
post_datedatetimePublication date
post_modifieddatetimeLast modified date
post_titletinytextPost title
post_slugtextURL slug
post_contentlongtextFull content
post_summarymediumtextExcerpt/preview
post_statusVARCHAR(20)publish, draft, pending, private
post_visibilityVARCHAR(20)public, private, password-protected
post_passwordVARCHAR(255)Password for protected posts
post_tagstextComma-separated tags
post_keywordVARCHAR(255)SEO keywords
post_typeVARCHAR(120)blog, article, news, page
comment_statusVARCHAR(20)open, closed

tbl_topics

Categories/topics for organizing posts.

Column Type Description
IDBIGINTPrimary key
topic_titleVARCHAR(255)Category name
topic_slugVARCHAR(255)URL slug
topic_statusENUM('Y','N')Active/inactive
topic_localeVARCHAR(10)Language code (i18n)

tbl_comments

Comments and replies.

Column Type Description
IDBIGINTPrimary key
comment_post_idBIGINTPost ID (FK to tbl_posts)
comment_parent_idBIGINTParent comment ID (0 for top-level)
comment_author_nameVARCHAR(60)Author name
comment_author_ipVARCHAR(100)Author IP address
comment_author_emailVARCHAR(100)Author email
comment_contenttextComment text
comment_statusVARCHAR(20)approved, pending, spam
comment_datedatetimeSubmission date

tbl_media

Media library files.

Column Type Description
IDBIGINTPrimary key
media_filenameVARCHAR(200)File name
media_captionVARCHAR(200)File caption
media_typeVARCHAR(90)MIME type
media_targetVARCHAR(20)blog, page
media_userVARCHAR(20)Uploader
media_accessVARCHAR(10)public, private
media_statusINTStatus flag

tbl_menu

Navigation menus.

Column Type Description
IDINTPrimary key
menu_labelVARCHAR(200)Menu item text
menu_linkVARCHAR(255)URL
menu_statusENUM('Y','N')Active/inactive
menu_visibilityVARCHAR(20)Visibility setting
parent_idINTParent menu item
menu_sortINTSort order

tbl_settings

Configuration settings.

Column Type Description
IDINTPrimary key
setting_nameVARCHAR(255)Setting key
setting_valueTEXTSetting value

tbl_themes

Installed themes.

Column Type Description
IDINTPrimary key
theme_titleVARCHAR(100)Theme name
theme_desctinytextDescription
theme_designerVARCHAR(90)Author
theme_directoryVARCHAR(100)Directory name
theme_statusENUM('Y','N')Active/inactive

tbl_plugin

Installed plugins.

Column Type Description
IDBIGINTPrimary key
plugin_nameVARCHAR(100)Plugin name
plugin_linkVARCHAR(255)Plugin URL
plugin_directoryVARCHAR(100)Directory name
plugin_desctinytextDescription
plugin_statusENUM('Y','N')Enabled/disabled
plugin_levelVARCHAR(20)Required level
plugin_sortINTSort order

Additional Tables

Table Purpose
tbl_user_tokenPassword reset tokens
tbl_login_attemptLogin attempt tracking
tbl_post_topicPost-topic relationships (many-to-many)
tbl_mediametaMedia metadata
tbl_media_downloadDownload tracking
tbl_consentsGDPR consent records
tbl_data_requestsGDPR data requests
tbl_privacy_logsPrivacy audit trail
tbl_privacy_policiesPrivacy policy versions
tbl_languagesSupported languages (i18n)
tbl_translationsTranslation strings (i18n)
tbl_download_logFile download logs