Skip to main content
Sign in
Snippets Groups Projects
Select Git revision
  • bae04c21cf3a1882fb560af81cc635e002888ba9
  • master default protected
2 results

database.sql

Blame
  • user avatar
    Jonas Leder authored
    f4afafc2
    History
    database.sql 835 B
    CREATE TABLE `posts` (
                             `id` int NOT NULL,
                             `title` text,
                             `content` text,
                             `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
    ALTER TABLE `posts`
        ADD PRIMARY KEY (`id`);
    
    ALTER TABLE `posts`
        MODIFY `id` int NOT NULL AUTO_INCREMENT;
    
    
    CREATE TABLE `comments` (
                                `id` int(11) NOT NULL,
                                `name` longtext NOT NULL,
                                `email` longtext NOT NULL,
                                `comment` longtext NOT NULL,
                                `article` text NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    ALTER TABLE `comments`
        ADD PRIMARY KEY (`id`);
    
    ALTER TABLE `comments`
        MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;