core/set/install/lk_mysql.php

27 lines
894 B
PHP
Raw Normal View History

2023-04-09 19:52:26 +05:00
<?php
\DB::set("CREATE TABLE IF NOT EXISTS `adres_dostavki` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`user_id` int(10) DEFAULT NULL,
`city_id` varchar(100) DEFAULT NULL,
`region_id` varchar(100) DEFAULT NULL,
`street` varchar(11) DEFAULT NULL,
`dom` varchar(11) DEFAULT NULL,
`kvartira` int(10) DEFAULT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci");
\DB::set("CREATE TABLE IF NOT EXISTS `client_org` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`org_id` int(10) DEFAULT NULL,
`user_id` int(10) DEFAULT NULL,
`srok_doverki` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`org_id`) REFERENCES `org` (`id`),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci");
?>