92 lines
2.5 KiB
PHP
92 lines
2.5 KiB
PHP
<?php
|
|
/*
|
|
mysql -u admin -p tk-ligat < adminer.sql
|
|
*/
|
|
|
|
|
|
|
|
\DB::set("CREATE TABLE IF NOT EXISTS `tovar` (
|
|
`id` int(10)NULL,
|
|
`title` varchar(300) NULL,
|
|
`txt` longtext NULL,
|
|
`keywords` longtext NULL,
|
|
`artikul` varchar(50) NULL,
|
|
`description` longtext NULL,
|
|
`tovar_id_1c` varchar(100) NULL,
|
|
`tovar_cat_1c` varchar(100) NULL,
|
|
`status` int(1)NULL,
|
|
`category` int(10)NULL,
|
|
`countImg` int(2)NULL,
|
|
`partner` varchar(100) NULL,
|
|
`json` longtext NULL,
|
|
`brand_id` int(10)NULL,
|
|
`check_img` int(1)NULL,
|
|
`code` varchar(30) NULL);");
|
|
|
|
|
|
\DB::set("CREATE TABLE IF NOT EXISTS `tovar_img` (
|
|
`id` int(10)NULL,
|
|
`filename` varchar(30) NULL,
|
|
|
|
|
|
`tovar_id` int(10)NULL,
|
|
`md5` varchar(30) NULL,
|
|
`title` varchar(300) NULL,
|
|
`alt` varchar(300) NULL);");
|
|
|
|
/*
|
|
|
|
\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';");
|
|
|
|
*/ |