8085446961 algohaven@gmail.com
Rani Laxmi Bai Chouraha, Mandsour
df1. posts Table | TechBlog Skip to content
By 5 min read Web Development 0 views

df1. posts Table

The posts table stores blog post data, as seen in the insertPost and updatePost methods. The fields include id, title, description, content, author_name, published_date, modified_date, featured_image, image_alt, image_caption, keywords, og_title, og_description, og_image, twitter_title, twitter_description, twitter_image, read_time, and views.

Modern web development workspace
A modern web development workspace equipped with the latest tools.
CREATE TABLE posts (
    id INT AUTO_INCREMENT PRIMARY KEY,
    title VARCHAR(255) NOT NULL,
    description TEXT NOT NULL,
    content TEXT NOT NULL,
    author_name VARCHAR(100) NOT NULL,
    published_date DATETIME NOT NULL,
    modified_date DATETIME NOT NULL,
    featured_image VARCHAR(255) DEFAULT '',
    image_alt VARCHAR(255) DEFAULT '',
    image_caption TEXT DEFAULT '',
    keywords TEXT DEFAULT '',
    og_title VARCHAR(255) DEFAULT '',
    og_description TEXT DEFAULT '',
    og_image VARCHAR(255) DEFAULT '',
    twitter_title VARCHAR(255) DEFAULT '',
    twitter_description TEXT DEFAULT '',
    twitter_image VARCHAR(255) DEFAULT '',
    read_time VARCHAR(50) DEFAULT '5 min read',
    views INT DEFAULT 0,
    INDEX idx_published_date (published_date)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
AlgoHaventech - Coding Institute