core/set/install/install_mysql.php

55 lines
1.7 KiB
PHP

<?php
\DB::set("CREATE TABLE IF NOT EXISTS `blog_category` (
`id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`title` varchar(250) NULL,
`keywords` longtext NULL,
`description` varchar(250) NULL,
`status` int NULL,
`category` int NULL,
`user_id` int(10) NOT NULL,
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE='InnoDB' COLLATE 'utf8_general_ci';");
\DB::set("CREATE TABLE IF NOT EXISTS `blog` (
`id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`title` varchar(250) NULL,
`txt` longtext NULL,
`t` varchar(20) NULL,
`keywords` longtext NULL,
`description` varchar(250) NULL,
`alias` varchar(250) NULL,
`status` int(1) NULL,
`category` int(10) NULL,
`user_id` int(10) NULL,
`reyt` int(10) NULL DEFAULT '0',
FOREIGN KEY (`category`) REFERENCES `blog_category` (`id`),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE='InnoDB' COLLATE 'utf8_general_ci';");
\DB::set("CREATE TABLE IF NOT EXISTS `page_category` (
`id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`title` varchar(250) NULL,
`keywords` longtext NULL,
`description` varchar(250) NULL,
`status` int NULL,
`category` int NULL,
`user_id` int(10) NOT NULL,
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE='InnoDB' COLLATE 'utf8_general_ci';");
\DB::set("CREATE TABLE IF NOT EXISTS `page` (
`id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`title` varchar(250) NULL,
`txt` longtext NULL,
`t` varchar(20) NULL,
`alias` varchar(250) NULL,
`keywords` longtext NULL,
`description` varchar(250) NULL,
`status` int(1) NULL,
`category` int(10) NULL,
`user_id` int(10) NULL,
`reyt` int(10) NULL DEFAULT '0',
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE='InnoDB' COLLATE 'utf8_general_ci';");