Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # MySQL-Front 5.0 (Build 1.0)
- /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */;
- /*!40101 SET SQL_MODE='' */;
- /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */;
- /*!40103 SET SQL_NOTES='ON' */;
- /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS */;
- /*!40014 SET UNIQUE_CHECKS=0 */;
- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS */;
- /*!40014 SET FOREIGN_KEY_CHECKS=0 */;
- # Host: localhost DATABASE: sinfo
- # ------------------------------------------------------
- # Server version 5.1.36-community-log
- DROP DATABASE IF EXISTS `sinfo`;
- CREATE DATABASE `sinfo` /*!40100 DEFAULT CHARACTER SET utf8 */;
- USE `sinfo`;
- CREATE TABLE `comissao` (
- `Id` INT(11) NOT NULL AUTO_INCREMENT,
- `NumeroAluno` INT(11) UNSIGNED NOT NULL DEFAULT '0',
- `Curso` enum('leic','meic','deic','trabalha','outro') NOT NULL DEFAULT 'leic',
- PRIMARY KEY (`Id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40000 ALTER TABLE `comissao` ENABLE KEYS */;
- UNLOCK TABLES;
- #
- # TABLE STRUCTURE FOR TABLE empresas
- #
- CREATE TABLE `empresas` (
- `Id_Empresa` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `Nome` VARCHAR(255) NOT NULL DEFAULT '',
- `Categoria` VARCHAR(255) DEFAULT NULL,
- `Detalhes` text,
- `Tipo` enum('outro','imprensa','spinoff','banco','consultoria','inteligencia artificial','multimedia','política e autarquica','redes','revista','telecomunicacoes','transportes','venda e distribuicao') NOT NULL DEFAULT 'outro',
- `Morada` text,
- `Telefone` INT(11) UNSIGNED DEFAULT NULL,
- `E-mail` VARCHAR(255) DEFAULT NULL,
- `Id_Forum` INT(11) UNSIGNED DEFAULT NULL,
- `Id_Thread` INT(11) UNSIGNED DEFAULT NULL,
- `Site` VARCHAR(300) DEFAULT NULL,
- PRIMARY KEY (`Id_Empresa`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
- INSERT INTO `empresas` VALUES (3,'',NULL,NULL,'outro',NULL,NULL,NULL,NULL,NULL,NULL);
- /*!40000 ALTER TABLE `empresas` ENABLE KEYS */;
- UNLOCK TABLES;
- #
- # TABLE STRUCTURE FOR TABLE empresas_contactos
- #
- CREATE TABLE `empresas_contactos` (
- `Id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `Id_Empresa` INT(11) UNSIGNED NOT NULL,
- `Nome` VARCHAR(255) NOT NULL DEFAULT '',
- `Detalhes` text,
- `E-mail` VARCHAR(255) DEFAULT '',
- `Telefone` INT(15) UNSIGNED DEFAULT NULL,
- `Activo` tinyint(1) UNSIGNED NOT NULL DEFAULT '1',
- `Cargo` VARCHAR(255) DEFAULT NULL COMMENT 'cargo dentro da empresa',
- PRIMARY KEY (`Id`),
- KEY `Id_Empresa` (`Id_Empresa`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40000 ALTER TABLE `empresas_contactos` ENABLE KEYS */;
- UNLOCK TABLES;
- #
- # TABLE STRUCTURE FOR TABLE empresas_participacoes
- #
- CREATE TABLE `empresas_participacoes` (
- `Id` INT(11) NOT NULL AUTO_INCREMENT,
- `Id_Empresa` INT(11) UNSIGNED NOT NULL,
- `Edicao` INT(11) UNSIGNED NOT NULL DEFAULT '0',
- `Detalhes` text COMMENT 'tipo de stand, temas, razao de rejeicao etc...',
- `Participacao` enum('wps','wp','ps','ws','w','p','s','rejeitou') DEFAULT NULL COMMENT 'w - workshop, s - stand, p - presentation',
- `Valor` FLOAT(10,3) UNSIGNED NOT NULL DEFAULT '0.000',
- PRIMARY KEY (`Id`),
- UNIQUE KEY `NewIndex` (`Edicao`,`Id_Empresa`),
- KEY `Id_Empresa` (`Id_Empresa`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
- INSERT INTO `empresas_participacoes` VALUES (3,3,0,NULL,NULL,0);
- /*!40000 ALTER TABLE `empresas_participacoes` ENABLE KEYS */;
- UNLOCK TABLES;
- #
- # FOREIGN KEYS FOR TABLE empresas_contactos
- #
- ALTER TABLE `empresas_contactos`
- ADD CONSTRAINT `empresas_contactos_ibfk_1` FOREIGN KEY (`Id_Empresa`) REFERENCES `empresas` (`Id_Empresa`) ON DELETE CASCADE,
- ADD CONSTRAINT `empresas_contactos_ibfk_2` FOREIGN KEY (`Id_Empresa`) REFERENCES `empresas` (`Id_Empresa`) ON DELETE CASCADE;
- #
- # FOREIGN KEYS FOR TABLE empresas_participacoes
- #
- ALTER TABLE `empresas_participacoes`
- ADD CONSTRAINT `empresas_participacoes_ibfk_1` FOREIGN KEY (`Id_Empresa`) REFERENCES `empresas` (`Id_Empresa`) ON DELETE CASCADE;
- /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
- /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
- /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
- /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
Add Comment
Please, Sign In to add comment