32 lines
968 B
PHP
32 lines
968 B
PHP
<?php
|
|
|
|
//24.06.2023
|
|
\DB::set("ALTER TABLE `org`ADD `user_id` int(10) NULL;");
|
|
|
|
|
|
|
|
\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");
|
|
|
|
|
|
|
|
?>
|