O wordpresu

Tvorba SQL tabulek

Když spustíte příkazy uvedené níže v phpMyAdmin vytvoří se tabulky pro WordPress.

phpMyAdmin


— Struktura tabulky `wp_posts`

CREATE TABLE `wp_posts` (
`ID` bigint(20) UNSIGNED NOT NULL,
`post_author` bigint(20) UNSIGNED NOT NULL DEFAULT ‚0‘,
`post_date` datetime NOT NULL DEFAULT ‚0000-00-00 00:00:00‘,
`post_date_gmt` datetime NOT NULL DEFAULT ‚0000-00-00 00:00:00‘,
`post_content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`post_title` text COLLATE utf8mb4_unicode_ci NOT NULL,
`post_excerpt` text COLLATE utf8mb4_unicode_ci NOT NULL,
`post_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ‚publish‘,
`comment_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ‚open‘,
`ping_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ‚open‘,
`post_password` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`post_name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`to_ping` text COLLATE utf8mb4_unicode_ci NOT NULL,
`pinged` text COLLATE utf8mb4_unicode_ci NOT NULL,
`post_modified` datetime NOT NULL DEFAULT ‚0000-00-00 00:00:00‘,
`post_modified_gmt` datetime NOT NULL DEFAULT ‚0000-00-00 00:00:00‘,
`post_content_filtered` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`post_parent` bigint(20) UNSIGNED NOT NULL DEFAULT ‚0‘,
`guid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`menu_order` int(11) NOT NULL DEFAULT ‚0‘,
`post_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ‚post‘,
`post_mime_type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`comment_count` bigint(20) NOT NULL DEFAULT ‚0‘
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


— Struktura tabulky `wp_commentmeta`

CREATE TABLE `wp_commentmeta` (
`meta_id` bigint(20) UNSIGNED NOT NULL,
`comment_id` bigint(20) UNSIGNED NOT NULL DEFAULT ‚0‘,
`meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`meta_value` longtext COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

— ——————————————————–


— Struktura tabulky `wp_comments`

CREATE TABLE `wp_comments` (
`comment_ID` bigint(20) UNSIGNED NOT NULL,
`comment_post_ID` bigint(20) UNSIGNED NOT NULL DEFAULT ‚0‘,
`comment_author` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
`comment_author_email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`comment_author_url` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`comment_author_IP` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`comment_date` datetime NOT NULL DEFAULT ‚0000-00-00 00:00:00‘,
`comment_date_gmt` datetime NOT NULL DEFAULT ‚0000-00-00 00:00:00‘,
`comment_content` text COLLATE utf8mb4_unicode_ci NOT NULL,
`comment_karma` int(11) NOT NULL DEFAULT ‚0‘,
`comment_approved` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ‚1‘,
`comment_agent` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`comment_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`comment_parent` bigint(20) UNSIGNED NOT NULL DEFAULT ‚0‘,
`user_id` bigint(20) UNSIGNED NOT NULL DEFAULT ‚0‘
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

 

 


— Struktura tabulky `wp_links`

CREATE TABLE `wp_links` (
`link_id` bigint(20) UNSIGNED NOT NULL,
`link_url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`link_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`link_image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`link_target` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`link_description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`link_visible` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ‚Y‘,
`link_owner` bigint(20) UNSIGNED NOT NULL DEFAULT ‚1‘,
`link_rating` int(11) NOT NULL DEFAULT ‚0‘,
`link_updated` datetime NOT NULL DEFAULT ‚0000-00-00 00:00:00‘,
`link_rel` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`link_notes` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
`link_rss` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

— ——————————————————–


— Struktura tabulky `wp_options`

CREATE TABLE `wp_options` (
`option_id` bigint(20) UNSIGNED NOT NULL,
`option_name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`option_value` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`autoload` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ‚yes‘
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

— ——————————————————–


— Struktura tabulky `wp_users`

CREATE TABLE `wp_users` (
`ID` bigint(20) UNSIGNED NOT NULL,
`user_login` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`user_pass` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`user_nicename` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`user_email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`user_url` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`user_registered` datetime NOT NULL DEFAULT ‚0000-00-00 00:00:00‘,
`user_activation_key` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “,
`user_status` int(11) NOT NULL DEFAULT ‚0‘,
`display_name` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT “
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;