core/set/install/lk_mysql.php

32 lines
968 B
PHP
Raw Normal View History

2023-04-09 19:52:26 +05:00
<?php
2023-07-12 20:02:20 +05:00
//24.06.2023
\DB::set("ALTER TABLE `org`ADD `user_id` int(10) NULL;");
2023-04-09 19:52:26 +05:00
\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");
?>