text: CREATE TABLE `posts` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `titulo` varchar(130) NOT NULL,
    `fecha_publicacion` timestamp NULL DEFAULT NULL,
    `contenido` text NOT NULL,
    `estatus` char(8) DEFAULT 'activo',
    `usuario_id` int(11) DEFAULT NULL,
    `categoria_id` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `posts_usuarios_idx` (`usuario_id`),
    KEY `posts_categorias_idx` (`categoria_id`),
    CONSTRAINT `posts_categorias` FOREIGN KEY (`categoria_id`) REFERENCES `categorias` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
    CONSTRAINT `posts_usuarios` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
  ) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8;
  
  CREATE TABLE `comentarios` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `cuerpo_comentario` text NOT NULL,
    `usuario_id` int(11) NOT NULL,
    `post_id` int(11) NOT NULL,
    PRIMARY KEY (`id`),
    KEY `comentarios_usuario_idx` (`usuario_id`),
    KEY `comentarios_post_idx` (`post_id`),
    CONSTRAINT `comentarios_post` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
    CONSTRAINT `comentarios_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  