Commit 034ef98a authored by Georgios Tsakalos's avatar Georgios Tsakalos

update school db schema

change telephone from int to varchar
parent 403e3caa
......@@ -205,7 +205,7 @@ CREATE TABLE `teacher` (
`school_id` int(11) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`surname` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`telephone` int(11) unsigned NOT NULL,
`telephone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`branch_id` int(11) unsigned NOT NULL,
`is_principle` tinyint(1) unsigned DEFAULT '0',
......@@ -267,16 +267,16 @@ CREATE TABLE `lab` (
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`area` int(11) unsigned NOT NULL,
`attachment` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`in_school_use` tinyint(1) unsigned DEFAULT '0',
`out_school_use` tinyint(1) unsigned DEFAULT '0',
`has_network` tinyint(1) unsigned DEFAULT '0',
`attachment` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`use_in_program` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`use_ext_school` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`has_network`varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`has_server` tinyint(1) unsigned DEFAULT '0',
`teacher_id` int(11) unsigned DEFAULT NULL,
`responsible` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `school_id` (`school_id`),
KEY `index_foreignkey_lab_teacher` (`teacher_id`),
CONSTRAINT `c_fk_lab_teacher_id` FOREIGN KEY (`teacher_id`) REFERENCES `teacher` (`id`),
KEY `index_foreignkey_lab_teacher` (`responsible`),
CONSTRAINT `c_fk_lab_responsible` FOREIGN KEY (`responsible`) REFERENCES `teacher` (`id`),
CONSTRAINT `lab_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `school` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment