diff --git a/.gitignore b/.gitignore
index fd06584..372977c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ config/config.php
composer.lock
nbproject
.idea
+orcamentos_diagram.asta.bak
diff --git a/README.md b/README.md
index 8527a27..077af44 100644
--- a/README.md
+++ b/README.md
@@ -2,26 +2,29 @@
### Configure o Apache VirtualHost
-
- DocumentRoot "/" #ver instruções abaixo
- ServerName orcamentos.dev
-
- /">
- Options Indexes Multiviews FollowSymLinks
- AllowOverride All
- Order allow,deny
- Allow from all
-
-
- RewriteEngine On
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule !\.(js|ico|gif|jpg|png|css|htm|html|txt|mp3)$ index.php
-
-
+```apache
+
+ DocumentRoot "/" #ver instruções abaixo
+ ServerName orcamentos.dev
+
+ /">
+ Options Indexes Multiviews FollowSymLinks
+ AllowOverride All
+ Order allow,deny
+ Allow from all
+
+ RewriteEngine On
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule !\.(js|ico|gif|jpg|png|css|htm|html|txt|mp3)$ index.php
+
+
+```
É preciso criar o alias para o endereço _orcamentos.dev_ no seu /etc/hosts (Linux ou Mac)
-`127.0.0.1 orcamentos.dev`
+```ini
+127.0.0.1 orcamentos.dev
+```
Para criação de um virtual host no **Windows**, siga as instruções encontradas [neste link](http://www.emersoncarvalho.com/web/configurando-virtual-hosts-no-windows/).
@@ -33,11 +36,41 @@ Através da linha de comando, acessar sua pasta de projetos e clonar com `git cl
Acessar a pasta criada `cd ` e atualizar o Composer fornecido:
-`php composer.phar self-update`
+```bash
+$ php composer.phar self-update
+```
Instalar as dependências do projeto:
-`php composer.phar update`
+```bash
+$ php composer.phar update
+```
+
+### Linhas de comando
+
+Para facilicar algumas tarefas do projeto foi criado uma interface de linha de comando que pode ser executada de duas formas:
+
+```bash
+$ ./bin/orcamentos
+```
+
+ou
+
+```bash
+$ php bin/orcamentos.php
+```
+
+Executando o comando acima será exibido os comandos disponiveis, para executar algum comando disponível basta exectuar:
+
+```bash
+$ ./bin/orcamentos comando
+```
+
+ou
+
+```bash
+$ php bin/orcamentos.php comando
+```
### Configuração
@@ -47,7 +80,31 @@ Basta duplicar o arquivo `config/config.php.sample` para `config/config.php` e m
O projeto usa o Doctrine, então é preciso criar a base de dados (de acordo com as configurações do config.php) e executar:
-`./bin/orcamentos orcamentos:initialize`
+```bash
+$ ./bin/orcamentos orcamentos:initialize
+```
+
+**OBS:** O comando acima deve ser executado apenas para criação do projeto.
+
+### Atualizando banco de dados
+
+Para facilitar a evolução do banco foi utilizado [Doctrine Migrations](http://www.doctrine-project.org/projects/migrations.html) uma ferramenta de versionamento para banco de dados.
+
+Para efetuar qualquer alteração no banco de dados, basta criar e/ou alterar e/ou remover qualquer atributos e/ou entidade presente na pasta `src/Orcamentos/Model` e executar:
+
+```bash
+$ ./bin/orcamentos migrations:diff
+```
+
+Esse comanda irá comprar os mapeamentos com banco configura e gerar um novo arquivo em `src/Orcamentos/Migrations` com essas alterações.
+
+Para aplicar as diferenças ao banco basta executar:
+
+```bash
+$ ./bin/orcamentos migrations:migrate
+```
+
+Para outros comandos ou dúvida basta acessar a documentação do [Doctrine Migrations](http://www.doctrine-project.org/projects/migrations.html).
### Exemplo de uso
diff --git a/bin/orcamentos b/bin/orcamentos
index b999f3e..66b33a0 100755
--- a/bin/orcamentos
+++ b/bin/orcamentos
@@ -1,17 +1,4 @@
#!/usr/bin/env php
setHelperSet(include 'cli-config.php');
-$application->add(new Orcamentos\Console\InitializeCommand);
-$application->add(new Orcamentos\Console\ResetPasswordCommand);
-
-ConsoleRunner::addCommands($application);
-
-$application->run();
+include "orcamentos.php";
diff --git a/bin/orcamentos.php b/bin/orcamentos.php
new file mode 100644
index 0000000..2c657af
--- /dev/null
+++ b/bin/orcamentos.php
@@ -0,0 +1,90 @@
+setProxyDir(sys_get_temp_dir() . '/' . md5(__DIR__));
+$config->setProxyNamespace('Proxies');
+$config->setAutoGenerateProxyClasses(true);
+$config->setMetadataDriverImpl($driver);
+$config->setMetadataCacheImpl($cache->newInstance());
+
+// EntityManager
+$em = EntityManager::create($configValues['db.options'], $config);
+
+// Console
+$console = new ConsoleApplication('Gerenciamento de Orçamentos', '1.0.0');
+$console->setCatchExceptions(true);
+$console->setHelperSet(new HelperSet([
+ 'db' => new ConnectionHelper($em->getConnection()),
+ 'em' => new EntityManagerHelper($em),
+ 'dialog' => $console->getHelperSet()->get('dialog'),
+ 'progress' => $console->getHelperSet()->get('progress'),
+ 'table' => $console->getHelperSet()->get('table'),
+ new FormatterHelper(),
+ new DebugFormatterHelper(),
+ new ProcessHelper(),
+ new QuestionHelper()
+]));
+
+$console->addCommands(array(
+ // ORM Commands
+ new \Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand(),
+ new \Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand(),
+ new \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand(),
+ new \Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand(),
+ new \Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand(),
+ new \Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand(),
+ new \Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand(),
+ new \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand(),
+ new \Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand(),
+
+ // Migrations Commands
+ new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand(),
+ new \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand(),
+ new \Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand(),
+ new \Doctrine\DBAL\Migrations\Tools\Console\Command\LatestCommand(),
+ new \Doctrine\DBAL\Migrations\Tools\Console\Command\MigrateCommand(),
+ new \Doctrine\DBAL\Migrations\Tools\Console\Command\StatusCommand(),
+ new \Doctrine\DBAL\Migrations\Tools\Console\Command\VersionCommand(),
+
+ // Orcamentos Commands
+ new Orcamentos\Console\InitializeCommand(),
+ new Orcamentos\Console\ResetPasswordCommand()
+));
+$console->run();
diff --git a/cli-config.php b/cli-config.php
deleted file mode 100644
index 9ee19e4..0000000
--- a/cli-config.php
+++ /dev/null
@@ -1,56 +0,0 @@
-add('Orcamentos', __DIR__.'/src');
-
-$configValues = require __DIR__ . '/config/config.php';
-
-use Doctrine\ORM\Tools\Setup;
-use Doctrine\ORM\EntityManager;
-use Doctrine\Common\Annotations\AnnotationRegistry;
-use Symfony\Component\Console\Helper\DebugFormatterHelper;
-use Symfony\Component\Console\Helper\ProcessHelper;
-use Symfony\Component\Console\Helper\QuestionHelper;
-use Symfony\Component\Console\Helper\HelperSet;
-use Symfony\Component\Console\Helper\FormatterHelper;
-use Symfony\Component\Console\Helper\DialogHelper;
-use Symfony\Component\Console\Helper\ProgressHelper;
-use Symfony\Component\Console\Helper\TableHelper;
-
-
-AnnotationRegistry::registerFile(__DIR__.'/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
-
-// configuration (2)
-$config = new \Doctrine\ORM\Configuration();
-
-// Proxies (3)
-$config->setProxyDir(sys_get_temp_dir() . '/' . md5(__DIR__));
-$config->setProxyNamespace('Proxies');
-$config->setAutoGenerateProxyClasses(true);
-
-// Driver (4)
-$driverImpl = new Doctrine\ORM\Mapping\Driver\AnnotationDriver(
- new Doctrine\Common\Annotations\AnnotationReader(),
- array(__DIR__.'/src/Orcamentos/Model')
-);
-$config->setMetadataDriverImpl($driverImpl);
-
-$cache = new \Doctrine\Common\Cache\ApcCache();
-
-$config->setMetadataCacheImpl($cache);
-
-$connectionOptions = $configValues['db.options'];
-
-$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config);
-
-return $helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
- 'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
- 'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em),
- new FormatterHelper(),
- new DialogHelper(),
- new ProgressHelper(),
- new TableHelper(),
- new DebugFormatterHelper(),
- new ProcessHelper(),
- new QuestionHelper()
-));
diff --git a/composer.json b/composer.json
index 2b275dd..0d36eac 100644
--- a/composer.json
+++ b/composer.json
@@ -1,31 +1,32 @@
{
- "name": "eminetto/silex-sample",
- "description": "Silex sample",
- "require": {
- "php": ">=5.3.3",
- "silex/silex": "1.0.*",
- "symfony/http-kernel": "*",
- "symfony/browser-kit": "*",
- "symfony/console": "*",
- "doctrine/dbal": "*",
- "doctrine/orm": "*",
- "twig/twig": ">=1.8,<2.0-dev",
- "intervention/image": "dev-master",
- "symfony/twig-bridge": "2.1.*",
- "swiftmailer/swiftmailer": ">=4.1.2,<4.2-dev",
- "dflydev/doctrine-orm-service-provider": "1.0.*@dev",
- "zendframework/zend-crypt": "*",
- "pagerfanta/pagerfanta": "1.0.*@dev"
- },
- "require-dev": {
- "sebastian/phpcpd": "*",
- "phpunit/phpunit": "*",
- "mockery/mockery": "dev-master@dev"
- },
- "minimum-stability": "dev",
- "autoload": {
- "psr-0": {
- "Orcamentos\\": "src/"
- }
- }
+ "name": "coderockr/orcamentos",
+ "description": "Aplicativo de gerenciamento de Orçamentos",
+ "require": {
+ "php": ">=5.3.3",
+ "silex/silex": "1.0.*",
+ "symfony/http-kernel": "*",
+ "symfony/browser-kit": "*",
+ "symfony/console": "*",
+ "doctrine/dbal": "*",
+ "doctrine/orm": "*",
+ "doctrine/migrations": "1.0.*@dev",
+ "dflydev/doctrine-orm-service-provider": "1.0.*@dev",
+ "twig/twig": ">=1.8,<2.0-dev",
+ "symfony/twig-bridge": "2.1.*",
+ "intervention/image": "dev-master",
+ "swiftmailer/swiftmailer": ">=4.1.2,<4.2-dev",
+ "zendframework/zend-crypt": "*",
+ "pagerfanta/pagerfanta": "1.0.*@dev"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "*",
+ "mockery/mockery": "dev-master@dev",
+ "sebastian/phpcpd": "*"
+ },
+ "autoload": {
+ "psr-4": {
+ "Orcamentos\\": "src/Orcamentos"
+ }
+ },
+ "minimum-stability": "dev"
}
diff --git a/composer.phar b/composer.phar
index 282583e..75f9c86 100755
Binary files a/composer.phar and b/composer.phar differ
diff --git a/docs/30_04_14_backup.sql b/docs/30_04_14_backup.sql
deleted file mode 100644
index 3f1d9f1..0000000
--- a/docs/30_04_14_backup.sql
+++ /dev/null
@@ -1,434 +0,0 @@
--- MySQL dump 10.13 Distrib 5.5.35, for debian-linux-gnu (i686)
---
--- Host: localhost Database: orcamentos
--- ------------------------------------------------------
--- Server version 5.5.35-0ubuntu0.12.04.2
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
---
--- Table structure for table `Client`
---
-
-DROP TABLE IF EXISTS `Client`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Client` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `company_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(255) NOT NULL,
- `cnpj` varchar(14) NOT NULL,
- `email` varchar(255) DEFAULT NULL,
- `logotype` varchar(255) DEFAULT NULL,
- `telephone` varchar(255) DEFAULT NULL,
- `responsable` varchar(255) NOT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `UNIQ_C0E80163C8C6906B` (`cnpj`),
- KEY `IDX_C0E80163979B1AD6` (`company_id`),
- CONSTRAINT `FK_C0E80163979B1AD6` FOREIGN KEY (`company_id`) REFERENCES `Company` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Client`
---
-
-LOCK TABLES `Client` WRITE;
-/*!40000 ALTER TABLE `Client` DISABLE KEYS */;
-INSERT INTO `Client` VALUES (1,1,'2014-04-01 12:21:19',NULL,'Mateus','7779998881','mateus@coderockr.com','mateus_logo.jpg','(49) 9978-2269','asdasdsdsasdasdadsadsaaaa'),(3,1,'2014-04-10 14:24:49',NULL,'Mateus','885522','nene@empresa.com','a8902045818f2506ea91ec42bc49321a.jpg','(49) 9978-2269','Vacilao'),(10,1,'2014-04-29 15:35:17',NULL,'Cliente2','','email@empresa.com','0df59e39755c02bb377f132751379e1d.jpg','','naotem');
-/*!40000 ALTER TABLE `Client` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `ClientNote`
---
-
-DROP TABLE IF EXISTS `ClientNote`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ClientNote` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `client_id` int(11) DEFAULT NULL,
- `quote_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `note` longtext COLLATE utf8_unicode_ci,
- PRIMARY KEY (`id`),
- KEY `IDX_4A1DDCA419EB6921` (`client_id`),
- KEY `IDX_4A1DDCA4DB805178` (`quote_id`),
- CONSTRAINT `FK_4A1DDCA419EB6921` FOREIGN KEY (`client_id`) REFERENCES `Client` (`id`),
- CONSTRAINT `FK_4A1DDCA4DB805178` FOREIGN KEY (`quote_id`) REFERENCES `Quote` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `ClientNote`
---
-
-LOCK TABLES `ClientNote` WRITE;
-/*!40000 ALTER TABLE `ClientNote` DISABLE KEYS */;
-/*!40000 ALTER TABLE `ClientNote` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Company`
---
-
-DROP TABLE IF EXISTS `Company`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Company` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(255) NOT NULL,
- `site` varchar(255) DEFAULT NULL,
- `logotype` varchar(255) NOT NULL,
- `responsable` varchar(255) DEFAULT NULL,
- `telephone` varchar(255) NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Company`
---
-
-LOCK TABLES `Company` WRITE;
-/*!40000 ALTER TABLE `Company` DISABLE KEYS */;
-INSERT INTO `Company` VALUES (1,'2014-04-01 12:20:01',NULL,'Coderockr','www.corderock.com','fe1cd280e01130b85c000d3724b43f7b.jpg','Xornas','(49) 9978-2269');
-/*!40000 ALTER TABLE `Company` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `PrivateNote`
---
-
-DROP TABLE IF EXISTS `PrivateNote`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `PrivateNote` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `project_id` int(11) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `note` longtext COLLATE utf8_unicode_ci,
- PRIMARY KEY (`id`),
- KEY `IDX_D911EC08166D1F9C` (`project_id`),
- KEY `IDX_D911EC08A76ED395` (`user_id`),
- CONSTRAINT `FK_D911EC08166D1F9C` FOREIGN KEY (`project_id`) REFERENCES `Project` (`id`),
- CONSTRAINT `FK_D911EC08A76ED395` FOREIGN KEY (`user_id`) REFERENCES `User` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `PrivateNote`
---
-
-LOCK TABLES `PrivateNote` WRITE;
-/*!40000 ALTER TABLE `PrivateNote` DISABLE KEYS */;
-INSERT INTO `PrivateNote` VALUES (4,4,1,'2014-04-17 09:47:50',NULL,'aaaaa');
-/*!40000 ALTER TABLE `PrivateNote` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Project`
---
-
-DROP TABLE IF EXISTS `Project`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Project` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `client_id` int(11) DEFAULT NULL,
- `company_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(255) NOT NULL,
- `description` varchar(255) DEFAULT NULL,
- `tags` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_E00EE97219EB6921` (`client_id`),
- KEY `IDX_E00EE972979B1AD6` (`company_id`),
- CONSTRAINT `FK_E00EE97219EB6921` FOREIGN KEY (`client_id`) REFERENCES `Client` (`id`),
- CONSTRAINT `FK_E00EE972979B1AD6` FOREIGN KEY (`company_id`) REFERENCES `Company` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Project`
---
-
-LOCK TABLES `Project` WRITE;
-/*!40000 ALTER TABLE `Project` DISABLE KEYS */;
-INSERT INTO `Project` VALUES (1,1,1,'2014-04-01 12:22:18',NULL,'Projeto novo','Descricao','app,novo,teste'),(3,1,1,'2014-04-10 14:30:20',NULL,'Movelsul 2014','sadasds','2,nova'),(4,1,1,'2014-04-15 08:45:09',NULL,'Projeto do mateus','hehehe','novo, 2'),(5,3,1,'2014-04-23 17:44:06',NULL,'Yeah','2222','222dd');
-/*!40000 ALTER TABLE `Project` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Quote`
---
-
-DROP TABLE IF EXISTS `Quote`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Quote` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `version` varchar(150) NOT NULL,
- `status` int(11) NOT NULL,
- `privateNotes` longtext,
- `project_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_AAB0E4F0166D1F9C` (`project_id`),
- CONSTRAINT `FK_AAB0E4F0166D1F9C` FOREIGN KEY (`project_id`) REFERENCES `Project` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Quote`
---
-
-LOCK TABLES `Quote` WRITE;
-/*!40000 ALTER TABLE `Quote` DISABLE KEYS */;
-INSERT INTO `Quote` VALUES (1,'2014-04-03 18:42:30',NULL,'versao 1',0,'',NULL),(2,'2014-04-10 17:49:34',NULL,'v2',1,'hehe',3),(15,'2014-04-15 11:10:44',NULL,'1',1,'dasdsaadsdsa',4);
-/*!40000 ALTER TABLE `Quote` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Resource`
---
-
-DROP TABLE IF EXISTS `Resource`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Resource` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `company_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(150) NOT NULL,
- `cost` double NOT NULL,
- `type_id` int(11) DEFAULT NULL,
- `equipmentLife` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_45E79640979B1AD6` (`company_id`),
- KEY `IDX_45E79640C54C8C93` (`type_id`),
- CONSTRAINT `FK_45E79640979B1AD6` FOREIGN KEY (`company_id`) REFERENCES `Company` (`id`),
- CONSTRAINT `FK_45E79640C54C8C93` FOREIGN KEY (`type_id`) REFERENCES `Type` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=111 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Resource`
---
-
-LOCK TABLES `Resource` WRITE;
-/*!40000 ALTER TABLE `Resource` DISABLE KEYS */;
-INSERT INTO `Resource` VALUES (78,1,'2014-04-15 11:02:54',NULL,'pc',22,2,13),(79,1,'2014-04-15 11:05:51',NULL,'das',21,1,NULL),(80,1,'2014-04-15 11:09:57',NULL,'dd',21,3,NULL),(81,1,'2014-04-15 11:10:23',NULL,'ca',14,3,NULL),(82,1,'2014-04-15 11:11:25',NULL,'xx',41,3,NULL),(107,1,'2014-04-24 16:40:58',NULL,'Teste',31,2,23),(110,1,'2014-04-28 15:27:02',NULL,'Algo',15.6,2,0);
-/*!40000 ALTER TABLE `Resource` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `ResourceQuote`
---
-
-DROP TABLE IF EXISTS `ResourceQuote`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ResourceQuote` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `resource_id` int(11) DEFAULT NULL,
- `quote_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `amount` double NOT NULL,
- `value` double NOT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_4BCB7FA489329D25` (`resource_id`),
- KEY `IDX_4BCB7FA4DB805178` (`quote_id`),
- CONSTRAINT `FK_4BCB7FA489329D25` FOREIGN KEY (`resource_id`) REFERENCES `Resource` (`id`),
- CONSTRAINT `FK_4BCB7FA4DB805178` FOREIGN KEY (`quote_id`) REFERENCES `Quote` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `ResourceQuote`
---
-
-LOCK TABLES `ResourceQuote` WRITE;
-/*!40000 ALTER TABLE `ResourceQuote` DISABLE KEYS */;
-INSERT INTO `ResourceQuote` VALUES (59,78,15,'2014-04-23 15:35:39',NULL,3111,21),(60,79,15,'2014-04-23 15:35:39',NULL,1,21),(61,80,15,'2014-04-23 15:35:39',NULL,213232,21),(62,82,15,'2014-04-23 15:35:39',NULL,111111,41),(63,78,2,'2014-04-29 15:20:22',NULL,21,22);
-/*!40000 ALTER TABLE `ResourceQuote` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Share`
---
-
-DROP TABLE IF EXISTS `Share`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Share` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `quote_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `email` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
- `sent` tinyint(1) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_2EC7B25EDB805178` (`quote_id`),
- CONSTRAINT `FK_2EC7B25EDB805178` FOREIGN KEY (`quote_id`) REFERENCES `Quote` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Share`
---
-
-LOCK TABLES `Share` WRITE;
-/*!40000 ALTER TABLE `Share` DISABLE KEYS */;
-INSERT INTO `Share` VALUES (37,2,'2014-04-29 13:48:20',NULL,'jao@coderockr.com',0),(38,2,'2014-04-29 13:49:08',NULL,'thiago@coderockr.com',0);
-/*!40000 ALTER TABLE `Share` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `ShareNote`
---
-
-DROP TABLE IF EXISTS `ShareNote`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ShareNote` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `share_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `note` longtext COLLATE utf8_unicode_ci,
- PRIMARY KEY (`id`),
- KEY `IDX_DAEA4B832AE63FDB` (`share_id`),
- CONSTRAINT `FK_DAEA4B832AE63FDB` FOREIGN KEY (`share_id`) REFERENCES `Share` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `ShareNote`
---
-
-LOCK TABLES `ShareNote` WRITE;
-/*!40000 ALTER TABLE `ShareNote` DISABLE KEYS */;
-/*!40000 ALTER TABLE `ShareNote` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Type`
---
-
-DROP TABLE IF EXISTS `Type`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Type` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `contractType` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Type`
---
-
-LOCK TABLES `Type` WRITE;
-/*!40000 ALTER TABLE `Type` DISABLE KEYS */;
-INSERT INTO `Type` VALUES (1,'2014-04-08 18:38:15',NULL,'Conta','service',NULL),(2,'2014-04-08 18:43:57',NULL,'Computador','equipment',NULL),(3,'2014-04-08 18:45:25',NULL,'Funcionario','human','CLT');
-/*!40000 ALTER TABLE `Type` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `User`
---
-
-DROP TABLE IF EXISTS `User`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `User` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `company_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(150) NOT NULL,
- `email` varchar(150) NOT NULL,
- `password` varchar(100) NOT NULL,
- `admin` tinyint(1) DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `UNIQ_2DA17977E7927C74` (`email`),
- KEY `IDX_2DA17977979B1AD6` (`company_id`),
- CONSTRAINT `FK_2DA17977979B1AD6` FOREIGN KEY (`company_id`) REFERENCES `Company` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `User`
---
-
-LOCK TABLES `User` WRITE;
-/*!40000 ALTER TABLE `User` DISABLE KEYS */;
-INSERT INTO `User` VALUES (1,1,'2014-04-03 18:31:49',NULL,'User 10','mateus@coderockr.com','$2y$10$b24QlFVVEAxE2Xp/q6d07ud0kS9xEgyHQNB9BpryHpjyz4XpOCOvi',1);
-/*!40000 ALTER TABLE `User` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `View`
---
-
-DROP TABLE IF EXISTS `View`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `View` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `share_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_5ECF04B02AE63FDB` (`share_id`),
- CONSTRAINT `FK_5ECF04B02AE63FDB` FOREIGN KEY (`share_id`) REFERENCES `Share` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `View`
---
-
-LOCK TABLES `View` WRITE;
-/*!40000 ALTER TABLE `View` DISABLE KEYS */;
-INSERT INTO `View` VALUES (1,NULL,'2014-04-30 14:49:07',NULL);
-/*!40000 ALTER TABLE `View` ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
--- Dump completed on 2014-04-30 19:38:38
diff --git a/docs/orcamento_17_04_2014.sql b/docs/orcamento_17_04_2014.sql
deleted file mode 100644
index 59c69e8..0000000
--- a/docs/orcamento_17_04_2014.sql
+++ /dev/null
@@ -1,434 +0,0 @@
--- MySQL dump 10.13 Distrib 5.5.35, for debian-linux-gnu (i686)
---
--- Host: localhost Database: orcamentos
--- ------------------------------------------------------
--- Server version 5.5.35-0ubuntu0.12.04.2
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
---
--- Table structure for table `Client`
---
-
-DROP TABLE IF EXISTS `Client`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Client` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `company_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(255) NOT NULL,
- `cnpj` varchar(14) NOT NULL,
- `email` varchar(255) DEFAULT NULL,
- `logotype` varchar(255) DEFAULT NULL,
- `telephone` varchar(255) DEFAULT NULL,
- `responsable` varchar(255) NOT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `UNIQ_C0E80163C8C6906B` (`cnpj`),
- KEY `IDX_C0E80163979B1AD6` (`company_id`),
- CONSTRAINT `FK_C0E80163979B1AD6` FOREIGN KEY (`company_id`) REFERENCES `Company` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Client`
---
-
-LOCK TABLES `Client` WRITE;
-/*!40000 ALTER TABLE `Client` DISABLE KEYS */;
-INSERT INTO `Client` VALUES (1,1,'2014-04-01 12:21:19',NULL,'Mateus','7779998881','mateus@coderockr.com','mateus_logo.jpg','(49) 9978-2269','asdasdsdsasdasdadsadsaaaa'),(3,1,'2014-04-10 14:24:49',NULL,'Mateus','885522','nene@empresa.com','a8902045818f2506ea91ec42bc49321a.jpg','(49) 9978-2269','Vacilao');
-/*!40000 ALTER TABLE `Client` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `ClientNote`
---
-
-DROP TABLE IF EXISTS `ClientNote`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ClientNote` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `client_id` int(11) DEFAULT NULL,
- `quote_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `note` longtext COLLATE utf8_unicode_ci,
- PRIMARY KEY (`id`),
- KEY `IDX_4A1DDCA419EB6921` (`client_id`),
- KEY `IDX_4A1DDCA4DB805178` (`quote_id`),
- CONSTRAINT `FK_4A1DDCA419EB6921` FOREIGN KEY (`client_id`) REFERENCES `Client` (`id`),
- CONSTRAINT `FK_4A1DDCA4DB805178` FOREIGN KEY (`quote_id`) REFERENCES `Quote` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `ClientNote`
---
-
-LOCK TABLES `ClientNote` WRITE;
-/*!40000 ALTER TABLE `ClientNote` DISABLE KEYS */;
-/*!40000 ALTER TABLE `ClientNote` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Company`
---
-
-DROP TABLE IF EXISTS `Company`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Company` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(255) NOT NULL,
- `site` varchar(255) DEFAULT NULL,
- `logotype` varchar(255) NOT NULL,
- `responsable` varchar(255) DEFAULT NULL,
- `telephone` varchar(255) NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Company`
---
-
-LOCK TABLES `Company` WRITE;
-/*!40000 ALTER TABLE `Company` DISABLE KEYS */;
-INSERT INTO `Company` VALUES (1,'2014-04-01 12:20:01',NULL,'Coderockr','www.corderock.com','f43b298bf1cffe86aceb36f4dbe88675.jpg','Xornas','(49) 3647-1069');
-/*!40000 ALTER TABLE `Company` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `PrivateNote`
---
-
-DROP TABLE IF EXISTS `PrivateNote`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `PrivateNote` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `project_id` int(11) DEFAULT NULL,
- `user_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `note` longtext COLLATE utf8_unicode_ci,
- PRIMARY KEY (`id`),
- KEY `IDX_D911EC08166D1F9C` (`project_id`),
- KEY `IDX_D911EC08A76ED395` (`user_id`),
- CONSTRAINT `FK_D911EC08166D1F9C` FOREIGN KEY (`project_id`) REFERENCES `Project` (`id`),
- CONSTRAINT `FK_D911EC08A76ED395` FOREIGN KEY (`user_id`) REFERENCES `User` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `PrivateNote`
---
-
-LOCK TABLES `PrivateNote` WRITE;
-/*!40000 ALTER TABLE `PrivateNote` DISABLE KEYS */;
-INSERT INTO `PrivateNote` VALUES (4,4,1,'2014-04-17 09:47:50',NULL,'aaaaa');
-/*!40000 ALTER TABLE `PrivateNote` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Project`
---
-
-DROP TABLE IF EXISTS `Project`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Project` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `client_id` int(11) DEFAULT NULL,
- `company_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(255) NOT NULL,
- `description` varchar(255) DEFAULT NULL,
- `tags` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_E00EE97219EB6921` (`client_id`),
- KEY `IDX_E00EE972979B1AD6` (`company_id`),
- CONSTRAINT `FK_E00EE97219EB6921` FOREIGN KEY (`client_id`) REFERENCES `Client` (`id`),
- CONSTRAINT `FK_E00EE972979B1AD6` FOREIGN KEY (`company_id`) REFERENCES `Company` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Project`
---
-
-LOCK TABLES `Project` WRITE;
-/*!40000 ALTER TABLE `Project` DISABLE KEYS */;
-INSERT INTO `Project` VALUES (1,1,1,'2014-04-01 12:22:18',NULL,'Projeto novo','Descricao','app,novo,teste'),(3,1,1,'2014-04-10 14:30:20',NULL,'Movelsul 2014','sadasds','2,nova'),(4,1,1,'2014-04-15 08:45:09',NULL,'Projeto do mateus','hehehe','novo, 2');
-/*!40000 ALTER TABLE `Project` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Quote`
---
-
-DROP TABLE IF EXISTS `Quote`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Quote` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `version` varchar(150) NOT NULL,
- `status` int(11) NOT NULL,
- `privateNotes` longtext,
- `project_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_AAB0E4F0166D1F9C` (`project_id`),
- CONSTRAINT `FK_AAB0E4F0166D1F9C` FOREIGN KEY (`project_id`) REFERENCES `Project` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Quote`
---
-
-LOCK TABLES `Quote` WRITE;
-/*!40000 ALTER TABLE `Quote` DISABLE KEYS */;
-INSERT INTO `Quote` VALUES (1,'2014-04-03 18:42:30',NULL,'versao 1',0,'',NULL),(2,'2014-04-10 17:49:34',NULL,'v2',1,'hehe',3),(15,'2014-04-15 11:10:44',NULL,'1',1,'',4);
-/*!40000 ALTER TABLE `Quote` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Resource`
---
-
-DROP TABLE IF EXISTS `Resource`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Resource` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `company_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(150) NOT NULL,
- `cost` double NOT NULL,
- `type_id` int(11) DEFAULT NULL,
- `equipmentLife` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_45E79640979B1AD6` (`company_id`),
- KEY `IDX_45E79640C54C8C93` (`type_id`),
- CONSTRAINT `FK_45E79640979B1AD6` FOREIGN KEY (`company_id`) REFERENCES `Company` (`id`),
- CONSTRAINT `FK_45E79640C54C8C93` FOREIGN KEY (`type_id`) REFERENCES `Type` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Resource`
---
-
-LOCK TABLES `Resource` WRITE;
-/*!40000 ALTER TABLE `Resource` DISABLE KEYS */;
-INSERT INTO `Resource` VALUES (78,1,'2014-04-15 11:02:54',NULL,'pc',21,2,13),(79,1,'2014-04-15 11:05:51',NULL,'das',21,1,NULL),(80,1,'2014-04-15 11:09:57',NULL,'dd',21,3,NULL),(81,1,'2014-04-15 11:10:23',NULL,'ca',14,3,NULL),(82,1,'2014-04-15 11:11:25',NULL,'xx',41,3,NULL);
-/*!40000 ALTER TABLE `Resource` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `ResourceQuote`
---
-
-DROP TABLE IF EXISTS `ResourceQuote`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ResourceQuote` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `resource_id` int(11) DEFAULT NULL,
- `quote_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `amount` double NOT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_4BCB7FA489329D25` (`resource_id`),
- KEY `IDX_4BCB7FA4DB805178` (`quote_id`),
- CONSTRAINT `FK_4BCB7FA489329D25` FOREIGN KEY (`resource_id`) REFERENCES `Resource` (`id`),
- CONSTRAINT `FK_4BCB7FA4DB805178` FOREIGN KEY (`quote_id`) REFERENCES `Quote` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `ResourceQuote`
---
-
-LOCK TABLES `ResourceQuote` WRITE;
-/*!40000 ALTER TABLE `ResourceQuote` DISABLE KEYS */;
-INSERT INTO `ResourceQuote` VALUES (55,78,15,'2014-04-15 11:32:01',NULL,3111),(56,79,15,'2014-04-15 11:32:01',NULL,1),(57,80,15,'2014-04-15 11:32:01',NULL,213232),(58,82,15,'2014-04-15 11:32:01',NULL,111111);
-/*!40000 ALTER TABLE `ResourceQuote` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Share`
---
-
-DROP TABLE IF EXISTS `Share`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Share` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `quote_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `email` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
- `sent` tinyint(1) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_2EC7B25EDB805178` (`quote_id`),
- CONSTRAINT `FK_2EC7B25EDB805178` FOREIGN KEY (`quote_id`) REFERENCES `Quote` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Share`
---
-
-LOCK TABLES `Share` WRITE;
-/*!40000 ALTER TABLE `Share` DISABLE KEYS */;
-INSERT INTO `Share` VALUES (4,15,'2014-04-16 09:12:32',NULL,'mateus@coderockr.com',0),(5,15,'2014-04-16 09:12:32',NULL,'thiago@coderockr.com',0),(6,15,'2014-04-16 09:15:36',NULL,'nene@empresa.com',0),(7,15,'2014-04-16 13:37:30',NULL,'jao@coderockr.com',0);
-/*!40000 ALTER TABLE `Share` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `ShareNote`
---
-
-DROP TABLE IF EXISTS `ShareNote`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ShareNote` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `share_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `note` longtext COLLATE utf8_unicode_ci,
- PRIMARY KEY (`id`),
- KEY `IDX_DAEA4B832AE63FDB` (`share_id`),
- CONSTRAINT `FK_DAEA4B832AE63FDB` FOREIGN KEY (`share_id`) REFERENCES `Share` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `ShareNote`
---
-
-LOCK TABLES `ShareNote` WRITE;
-/*!40000 ALTER TABLE `ShareNote` DISABLE KEYS */;
-INSERT INTO `ShareNote` VALUES (12,4,'2014-04-16 11:09:42',NULL,'Eu acho que o funcionario ta ganhando demais'),(13,4,'2014-04-16 11:09:48',NULL,'massa'),(14,5,'2014-04-16 11:17:02',NULL,'ALgo aqui'),(15,7,'2014-04-16 13:38:22',NULL,'Esse computador ta mto caro'),(16,7,'2014-04-16 13:48:37',NULL,'Esquisito'),(17,7,'2014-04-16 13:50:06',NULL,'jumanji'),(18,7,'2014-04-16 13:55:02',NULL,'adasdsaads'),(19,7,'2014-04-16 14:21:51',NULL,'eh nozes');
-/*!40000 ALTER TABLE `ShareNote` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `Type`
---
-
-DROP TABLE IF EXISTS `Type`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Type` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `contractType` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `Type`
---
-
-LOCK TABLES `Type` WRITE;
-/*!40000 ALTER TABLE `Type` DISABLE KEYS */;
-INSERT INTO `Type` VALUES (1,'2014-04-08 18:38:15',NULL,'Conta','service',NULL),(2,'2014-04-08 18:43:57',NULL,'Computador','equipment',NULL),(3,'2014-04-08 18:45:25',NULL,'Funcionario','human','CLT');
-/*!40000 ALTER TABLE `Type` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `User`
---
-
-DROP TABLE IF EXISTS `User`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `User` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `company_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- `name` varchar(150) NOT NULL,
- `email` varchar(150) NOT NULL,
- `password` varchar(100) NOT NULL,
- `admin` tinyint(1) DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `UNIQ_2DA17977E7927C74` (`email`),
- KEY `IDX_2DA17977979B1AD6` (`company_id`),
- CONSTRAINT `FK_2DA17977979B1AD6` FOREIGN KEY (`company_id`) REFERENCES `Company` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `User`
---
-
-LOCK TABLES `User` WRITE;
-/*!40000 ALTER TABLE `User` DISABLE KEYS */;
-INSERT INTO `User` VALUES (1,1,'2014-04-03 18:31:49',NULL,'User 10','mateus@coderockr.com','$2y$10$b24QlFVVEAxE2Xp/q6d07ud0kS9xEgyHQNB9BpryHpjyz4XpOCOvi',1);
-/*!40000 ALTER TABLE `User` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `View`
---
-
-DROP TABLE IF EXISTS `View`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `View` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `share_id` int(11) DEFAULT NULL,
- `created` datetime NOT NULL,
- `updated` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `IDX_5ECF04B02AE63FDB` (`share_id`),
- CONSTRAINT `FK_5ECF04B02AE63FDB` FOREIGN KEY (`share_id`) REFERENCES `Share` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=126 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `View`
---
-
-LOCK TABLES `View` WRITE;
-/*!40000 ALTER TABLE `View` DISABLE KEYS */;
-INSERT INTO `View` VALUES (3,NULL,'2014-04-16 09:20:32',NULL),(4,NULL,'2014-04-16 09:20:37',NULL),(5,4,'2014-04-16 09:20:58',NULL),(6,NULL,'2014-04-16 09:26:36',NULL),(7,4,'2014-04-16 09:26:37',NULL),(8,4,'2014-04-16 09:35:25',NULL),(9,4,'2014-04-16 09:40:59',NULL),(10,4,'2014-04-16 09:41:07',NULL),(11,4,'2014-04-16 09:41:17',NULL),(12,4,'2014-04-16 09:42:27',NULL),(13,4,'2014-04-16 09:42:57',NULL),(14,4,'2014-04-16 09:43:30',NULL),(15,4,'2014-04-16 09:44:33',NULL),(16,4,'2014-04-16 09:45:10',NULL),(17,4,'2014-04-16 09:46:20',NULL),(18,4,'2014-04-16 09:46:39',NULL),(19,4,'2014-04-16 09:47:57',NULL),(20,4,'2014-04-16 09:48:18',NULL),(21,4,'2014-04-16 09:48:52',NULL),(22,4,'2014-04-16 09:49:32',NULL),(23,4,'2014-04-16 09:49:57',NULL),(24,4,'2014-04-16 09:50:06',NULL),(25,4,'2014-04-16 09:50:16',NULL),(26,4,'2014-04-16 09:54:52',NULL),(27,4,'2014-04-16 09:55:01',NULL),(28,4,'2014-04-16 09:55:13',NULL),(29,4,'2014-04-16 09:55:20',NULL),(30,4,'2014-04-16 09:55:30',NULL),(31,4,'2014-04-16 09:56:11',NULL),(32,4,'2014-04-16 09:58:05',NULL),(33,4,'2014-04-16 09:59:40',NULL),(34,4,'2014-04-16 09:59:52',NULL),(35,4,'2014-04-16 09:59:58',NULL),(36,4,'2014-04-16 10:01:18',NULL),(37,4,'2014-04-16 10:01:29',NULL),(38,4,'2014-04-16 10:01:42',NULL),(39,4,'2014-04-16 10:02:23',NULL),(40,4,'2014-04-16 10:02:32',NULL),(41,4,'2014-04-16 10:02:51',NULL),(42,4,'2014-04-16 10:02:58',NULL),(43,4,'2014-04-16 10:03:13',NULL),(44,4,'2014-04-16 10:03:24',NULL),(45,4,'2014-04-16 10:04:44',NULL),(46,4,'2014-04-16 10:41:51',NULL),(47,4,'2014-04-16 10:42:30',NULL),(48,4,'2014-04-16 10:43:39',NULL),(49,4,'2014-04-16 10:43:53',NULL),(50,4,'2014-04-16 10:44:21',NULL),(51,4,'2014-04-16 10:44:31',NULL),(52,4,'2014-04-16 10:45:18',NULL),(53,4,'2014-04-16 10:45:41',NULL),(54,4,'2014-04-16 10:48:10',NULL),(55,4,'2014-04-16 10:48:32',NULL),(56,4,'2014-04-16 10:48:45',NULL),(57,4,'2014-04-16 10:49:01',NULL),(58,4,'2014-04-16 10:49:04',NULL),(59,4,'2014-04-16 10:49:52',NULL),(60,4,'2014-04-16 10:50:08',NULL),(61,4,'2014-04-16 10:51:06',NULL),(62,4,'2014-04-16 10:51:48',NULL),(63,4,'2014-04-16 10:52:14',NULL),(64,4,'2014-04-16 10:52:24',NULL),(65,4,'2014-04-16 10:52:56',NULL),(66,4,'2014-04-16 10:53:05',NULL),(67,4,'2014-04-16 10:53:40',NULL),(68,4,'2014-04-16 10:54:51',NULL),(69,4,'2014-04-16 10:55:27',NULL),(70,4,'2014-04-16 10:55:53',NULL),(71,4,'2014-04-16 10:56:02',NULL),(72,4,'2014-04-16 10:56:08',NULL),(73,4,'2014-04-16 10:56:30',NULL),(74,4,'2014-04-16 10:56:43',NULL),(75,4,'2014-04-16 10:57:01',NULL),(76,4,'2014-04-16 10:57:08',NULL),(77,4,'2014-04-16 10:57:15',NULL),(78,4,'2014-04-16 10:57:23',NULL),(79,4,'2014-04-16 10:57:28',NULL),(80,4,'2014-04-16 10:57:50',NULL),(81,4,'2014-04-16 10:58:13',NULL),(82,4,'2014-04-16 10:58:33',NULL),(83,4,'2014-04-16 10:59:05',NULL),(84,4,'2014-04-16 10:59:17',NULL),(85,4,'2014-04-16 11:01:37',NULL),(86,4,'2014-04-16 11:04:15',NULL),(87,4,'2014-04-16 11:05:11',NULL),(88,4,'2014-04-16 11:05:14',NULL),(89,4,'2014-04-16 11:06:19',NULL),(90,4,'2014-04-16 11:06:47',NULL),(91,4,'2014-04-16 11:07:10',NULL),(92,4,'2014-04-16 11:08:19',NULL),(93,4,'2014-04-16 11:08:29',NULL),(94,4,'2014-04-16 11:08:40',NULL),(95,4,'2014-04-16 11:09:08',NULL),(96,4,'2014-04-16 11:16:34',NULL),(97,5,'2014-04-16 11:16:56',NULL),(98,7,'2014-04-16 13:37:55',NULL),(99,7,'2014-04-16 13:39:11',NULL),(100,7,'2014-04-16 13:40:07',NULL),(101,7,'2014-04-16 13:41:02',NULL),(102,7,'2014-04-16 13:41:05',NULL),(103,7,'2014-04-16 13:41:11',NULL),(104,7,'2014-04-16 13:48:30',NULL),(105,7,'2014-04-16 13:49:33',NULL),(106,7,'2014-04-16 13:54:56',NULL),(107,7,'2014-04-16 13:56:51',NULL),(108,7,'2014-04-16 14:12:08',NULL),(109,7,'2014-04-16 14:12:44',NULL),(110,7,'2014-04-16 14:15:24',NULL),(111,7,'2014-04-16 14:16:12',NULL),(112,7,'2014-04-16 14:16:33',NULL),(113,7,'2014-04-16 14:17:05',NULL),(114,7,'2014-04-16 14:19:00',NULL),(115,7,'2014-04-16 14:19:23',NULL),(116,7,'2014-04-16 14:19:29',NULL),(117,7,'2014-04-16 14:19:34',NULL),(118,7,'2014-04-16 14:20:14',NULL),(119,7,'2014-04-16 14:20:34',NULL),(120,7,'2014-04-16 14:20:38',NULL),(121,7,'2014-04-16 14:21:39',NULL),(122,7,'2014-04-16 14:21:54',NULL),(123,4,'2014-04-16 14:37:54',NULL),(124,4,'2014-04-16 14:38:47',NULL),(125,4,'2014-04-16 15:08:50',NULL);
-/*!40000 ALTER TABLE `View` ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
--- Dump completed on 2014-04-17 17:20:10
diff --git a/docs/orcamentos_diagram.asta.bak b/docs/orcamentos_diagram.asta.bak
deleted file mode 100644
index 7a10d10..0000000
Binary files a/docs/orcamentos_diagram.asta.bak and /dev/null differ
diff --git a/migrations.yml b/migrations.yml
new file mode 100644
index 0000000..a9e9218
--- /dev/null
+++ b/migrations.yml
@@ -0,0 +1,4 @@
+name: Gerenciamento de Orcamentos - Migrations
+migrations_namespace: Orcamentos\Migrations
+table_name: doctrine_migration
+migrations_directory: src/Orcamentos/Migrations
diff --git a/phpunit.xml b/phpunit.xml
index 08db8c0..9d85f71 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -7,19 +7,21 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="false"
- bootstrap="phpunit_bootstrap.php"
->
-
+ syntaxCheck="false">
+
+
+
+
+
-
- src/
+
+ ./tests/
-
-
+
+
./src/
@@ -29,7 +31,8 @@
-
+
-
\ No newline at end of file
+
diff --git a/phpunit_bootstrap.php b/phpunit_bootstrap.php
deleted file mode 100644
index d60316a..0000000
--- a/phpunit_bootstrap.php
+++ /dev/null
@@ -1,6 +0,0 @@
-setName('orcamentos:initialize')
+ $this->setName('orcamentos:initialize')
->setDescription('Initialize the database and insert the initial data');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
-
-
- try {
- $command = $this->getApplication()->find('orm:schema-tool:create');
- $returnCode = $command->run($input, $output);
- } catch (\Exception $e) {
- $output->writeln("Your database alread have the schema!");
- }
-
+ $command = $this->getApplication()->find('migrations:migrate');
+ $command->run($input, $output);
$this->input = $input;
$this->output = $output;
diff --git a/src/Orcamentos/Console/ResetPasswordCommand.php b/src/Orcamentos/Console/ResetPasswordCommand.php
index e574b0c..5b1cc27 100644
--- a/src/Orcamentos/Console/ResetPasswordCommand.php
+++ b/src/Orcamentos/Console/ResetPasswordCommand.php
@@ -3,17 +3,12 @@
namespace Orcamentos\Console;
use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
-
-use Symfony\Component\Console\Question\Question;
use Symfony\Component\Console\Question\ChoiceQuestion;
+use Symfony\Component\Console\Question\Question;
use Zend\Crypt\Password\Bcrypt;
-use Orcamentos\Service\User as UserService;
-
class ResetPasswordCommand extends Command
{
@@ -22,14 +17,12 @@ class ResetPasswordCommand extends Command
protected function configure()
{
- $this
- ->setName('orcamentos:resetpwd')
+ $this->setName('orcamentos:resetpwd')
->setDescription('Reset user password');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
-
$this->input = $input;
$this->output = $output;
@@ -75,7 +68,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->getEm()->flush();
$output->writeln("The password has been successfully changed");
-
}
private function askForPassword()
diff --git a/src/Orcamentos/Model/Client.php b/src/Orcamentos/Model/Client.php
index 2cfa0ec..c224357 100644
--- a/src/Orcamentos/Model/Client.php
+++ b/src/Orcamentos/Model/Client.php
@@ -2,11 +2,10 @@
namespace Orcamentos\Model;
use Doctrine\ORM\Mapping as ORM;
-use DateTime;
/**
* @ORM\Entity
- * @ORM\Table(name="Client")
+ * @ORM\Table(name="client")
*/
class Client extends Entity
{
@@ -70,7 +69,7 @@ class Client extends Entity
/**
* @ORM\OneToMany(targetEntity="Project", mappedBy="client", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
*
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $projectCollection;
diff --git a/src/Orcamentos/Model/Company.php b/src/Orcamentos/Model/Company.php
index bed4987..25232b9 100644
--- a/src/Orcamentos/Model/Company.php
+++ b/src/Orcamentos/Model/Company.php
@@ -5,7 +5,7 @@
/**
* @ORM\Entity
- * @ORM\Table(name="Company")
+ * @ORM\Table(name="company")
*/
class Company extends Entity
{
@@ -69,7 +69,7 @@ class Company extends Entity
* @ORM\OneToMany(targetEntity="Client", mappedBy="company", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
*
* @ORM\OrderBy({"name" = "ASC"})
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $clientCollection;
@@ -77,14 +77,14 @@ class Company extends Entity
* @ORM\OneToMany(targetEntity="Project", mappedBy="company", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
* @ORM\OrderBy({"name" = "ASC"})
*
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $projectCollection;
/**
* @ORM\OneToMany(targetEntity="Resource", mappedBy="company", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
*
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $resourceCollection;
@@ -92,7 +92,7 @@ class Company extends Entity
* @ORM\OneToMany(targetEntity="User", mappedBy="company", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
* @ORM\OrderBy({"name" = "ASC"})
*
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $userCollection;
diff --git a/src/Orcamentos/Model/Plan.php b/src/Orcamentos/Model/Plan.php
index a1c052b..0846359 100644
--- a/src/Orcamentos/Model/Plan.php
+++ b/src/Orcamentos/Model/Plan.php
@@ -5,7 +5,7 @@
/**
* @ORM\Entity
- * @ORM\Table(name="Plan")
+ * @ORM\Table(name="plan")
*/
class Plan extends Entity
@@ -33,14 +33,14 @@ class Plan extends Entity
/* @ORM\Column(type="text", nullable=false)
*
- * @var text
+ * @var string
*/
private $description;
/**
* @ORM\OneToMany(targetEntity="Company", mappedBy="plan", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
*
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $companyCollection;
@@ -83,4 +83,15 @@ public function setPrice($price)
{
return $this->price = $price;
}
+
+ public function setDescription($description)
+ {
+ $this->description = $description;
+ }
+
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
}
diff --git a/src/Orcamentos/Model/PrivateNote.php b/src/Orcamentos/Model/PrivateNote.php
index dee62ea..e5947da 100644
--- a/src/Orcamentos/Model/PrivateNote.php
+++ b/src/Orcamentos/Model/PrivateNote.php
@@ -2,11 +2,10 @@
namespace Orcamentos\Model;
use Doctrine\ORM\Mapping as ORM;
-use DateTime;
/**
* @ORM\Entity
- * @ORM\Table(name="PrivateNote")
+ * @ORM\Table(name="privatenote")
*/
class PrivateNote extends Entity
{
@@ -28,7 +27,7 @@ class PrivateNote extends Entity
/**
* @ORM\Column(type="text", nullable=true)
*
- * @var text
+ * @var string
*/
private $note;
diff --git a/src/Orcamentos/Model/Project.php b/src/Orcamentos/Model/Project.php
index cca4181..c4cc143 100644
--- a/src/Orcamentos/Model/Project.php
+++ b/src/Orcamentos/Model/Project.php
@@ -5,7 +5,7 @@
/**
* @ORM\Entity
- * @ORM\Table(name="Project")
+ * @ORM\Table(name="project")
*/
class Project extends Entity
{
@@ -20,7 +20,7 @@ class Project extends Entity
/**
* @ORM\Column(type="text", nullable=true)
*
- * @var text
+ * @var string
*/
private $description;
@@ -48,14 +48,14 @@ class Project extends Entity
/**
* @ORM\OneToMany(targetEntity="Quote", mappedBy="project", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
*
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $quoteCollection;
/**
* @ORM\OneToMany(targetEntity="PrivateNote", mappedBy="project", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
* @ORM\OrderBy({"created" = "DESC"})
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $privateNotesCollection;
@@ -93,16 +93,6 @@ public function setDescription($description)
{
return $this->description = $description;
}
-
- public function getClientNotes()
- {
- return $this->clientNotes;
- }
-
- public function setClientNotes($clientNotes)
- {
- return $this->clientNotes = $clientNotes;
- }
public function getTags()
{
diff --git a/src/Orcamentos/Model/Quote.php b/src/Orcamentos/Model/Quote.php
index 8f6294d..02c3d6a 100644
--- a/src/Orcamentos/Model/Quote.php
+++ b/src/Orcamentos/Model/Quote.php
@@ -6,13 +6,13 @@
/**
* @ORM\Entity
- * @ORM\Table(name="Quote")
+ * @ORM\Table(name="quote")
*/
class Quote extends Entity
{
/**
* @ORM\Column(type="datetime",nullable=true)
- * @var datetime
+ * @var \DateTime
*/
protected $dueDate;
@@ -54,28 +54,28 @@ class Quote extends Entity
/**
* @ORM\Column(type="text",nullable=true)
*
- * @var text
+ * @var string
*/
private $privateNotes;
/**
* @ORM\Column(type="text",nullable=true)
*
- * @var text
+ * @var string
*/
private $deadline;
/**
* @ORM\Column(type="text",nullable=true)
*
- * @var text
+ * @var string
*/
private $priceDescription;
/**
* @ORM\Column(type="text",nullable=true)
*
- * @var text
+ * @var string
*/
private $paymentType;
@@ -89,14 +89,14 @@ class Quote extends Entity
/**
* @ORM\OneToMany(targetEntity="ResourceQuote", mappedBy="quote", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
*
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $resourceQuoteCollection;
/**
* @ORM\OneToMany(targetEntity="Share", mappedBy="quote", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
*
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $shareCollection;
diff --git a/src/Orcamentos/Model/Resource.php b/src/Orcamentos/Model/Resource.php
index 213ba62..56156a2 100644
--- a/src/Orcamentos/Model/Resource.php
+++ b/src/Orcamentos/Model/Resource.php
@@ -5,7 +5,7 @@
/**
* @ORM\Entity
- * @ORM\Table(name="Resource")
+ * @ORM\Table(name="resource")
*/
class Resource extends Entity
{
@@ -47,7 +47,7 @@ class Resource extends Entity
/**
* @ORM\OneToMany(targetEntity="ResourceQuote", mappedBy="resource", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
*
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $resourceQuoteCollection;
@@ -95,46 +95,6 @@ public function setCompany($company)
{
return $this->company = $company;
}
-
- public function getPrivateNotes()
- {
- return $this->privateNotes;
- }
-
- public function setPrivateNotes($privateNotes)
- {
- return $this->privateNotes = $privateNotes;
- }
-
- public function getDescription()
- {
- return $this->description;
- }
-
- public function setDescription($description)
- {
- return $this->description = $description;
- }
-
- public function getClientNotes()
- {
- return $this->clientNotes;
- }
-
- public function setClientNotes($clientNotes)
- {
- return $this->clientNotes = $clientNotes;
- }
-
- public function getTags()
- {
- return $this->tags;
- }
-
- public function setTags($tags)
- {
- return $this->tags = $tags;
- }
public function getType()
{
diff --git a/src/Orcamentos/Model/ResourceQuote.php b/src/Orcamentos/Model/ResourceQuote.php
index 6c84169..7419f48 100644
--- a/src/Orcamentos/Model/ResourceQuote.php
+++ b/src/Orcamentos/Model/ResourceQuote.php
@@ -5,7 +5,7 @@
/**
* @ORM\Entity
- * @ORM\Table(name="ResourceQuote")
+ * @ORM\Table(name="resourcequote")
*/
class ResourceQuote extends Entity
{
diff --git a/src/Orcamentos/Model/Share.php b/src/Orcamentos/Model/Share.php
index 377bfef..178e7f4 100644
--- a/src/Orcamentos/Model/Share.php
+++ b/src/Orcamentos/Model/Share.php
@@ -5,7 +5,7 @@
/**
* @ORM\Entity
- * @ORM\Table(name="Share")
+ * @ORM\Table(name="share")
*/
class Share extends Entity
{
@@ -47,14 +47,14 @@ class Share extends Entity
/**
* @ORM\OneToMany(targetEntity="View", mappedBy="share", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
*
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $viewCollection;
/**
* @ORM\OneToMany(targetEntity="ShareNote", mappedBy="share", cascade={"all"}, orphanRemoval=true, fetch="LAZY")
* @ORM\OrderBy({"created" = "DESC"})
- * @var Doctrine\Common\Collections\Collection
+ * @var \Doctrine\Common\Collections\Collection
*/
protected $shareNotesCollection;
diff --git a/src/Orcamentos/Model/ShareNote.php b/src/Orcamentos/Model/ShareNote.php
index ff3ac63..9769d25 100644
--- a/src/Orcamentos/Model/ShareNote.php
+++ b/src/Orcamentos/Model/ShareNote.php
@@ -2,11 +2,10 @@
namespace Orcamentos\Model;
use Doctrine\ORM\Mapping as ORM;
-use DateTime;
/**
* @ORM\Entity
- * @ORM\Table(name="ShareNote")
+ * @ORM\Table(name="sharenote")
*/
class ShareNote extends Entity
{
@@ -20,7 +19,7 @@ class ShareNote extends Entity
/**
* @ORM\Column(type="text", nullable=true)
*
- * @var text
+ * @var string
*/
private $note;
@@ -49,13 +48,4 @@ public function setNote($note)
return $this->note = $note;
}
- public function getShareNotesCollection()
- {
- return $this->shareNotesCollection;
- }
-
- public function setShareNotesCollection($shareNotesCollection)
- {
- return $this->shareNotesCollection = $shareNotesCollection;
- }
}
diff --git a/src/Orcamentos/Model/Type.php b/src/Orcamentos/Model/Type.php
index a9417d3..f36f6d8 100644
--- a/src/Orcamentos/Model/Type.php
+++ b/src/Orcamentos/Model/Type.php
@@ -1,18 +1,20 @@
-name;
}
-
+
public function setName($name)
{
return $this->name = filter_var($name, FILTER_SANITIZE_STRING);
diff --git a/src/Orcamentos/Model/User.php b/src/Orcamentos/Model/User.php
index e7952f3..f4ba465 100644
--- a/src/Orcamentos/Model/User.php
+++ b/src/Orcamentos/Model/User.php
@@ -5,7 +5,7 @@
/**
* @ORM\Entity
- * @ORM\Table(name="User")
+ * @ORM\Table(name="user")
*/
class User extends Entity
{
diff --git a/src/Orcamentos/Model/View.php b/src/Orcamentos/Model/View.php
index 1892eb3..1463be6 100644
--- a/src/Orcamentos/Model/View.php
+++ b/src/Orcamentos/Model/View.php
@@ -5,7 +5,7 @@
/**
* @ORM\Entity
- * @ORM\Table(name="View")
+ * @ORM\Table(name="view")
*/
class View extends Entity
{
diff --git a/src/Orcamentos/migrations/Version20140807204731.php b/src/Orcamentos/migrations/Version20140807204731.php
new file mode 100644
index 0000000..b4b2ded
--- /dev/null
+++ b/src/Orcamentos/migrations/Version20140807204731.php
@@ -0,0 +1,77 @@
+abortIf($this->connection->getDatabasePlatform()->getName() != "mysql", "Migration can only be executed safely on 'mysql'.");
+
+ $this->addSql("CREATE TABLE client (id INT AUTO_INCREMENT NOT NULL, company_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, cnpj VARCHAR(14) NOT NULL, corporateName VARCHAR(255) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, logotype VARCHAR(255) DEFAULT NULL, telephone VARCHAR(255) DEFAULT NULL, responsable VARCHAR(255) NOT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, INDEX IDX_C7440455979B1AD6 (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE company (id INT AUTO_INCREMENT NOT NULL, plan_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, city VARCHAR(255) DEFAULT NULL, taxes DOUBLE PRECISION NOT NULL, email VARCHAR(255) NOT NULL, telephone VARCHAR(255) NOT NULL, site VARCHAR(255) DEFAULT NULL, logotype VARCHAR(255) DEFAULT NULL, responsable VARCHAR(255) DEFAULT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, INDEX IDX_4FBF094FE899029B (plan_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE type (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, type VARCHAR(255) NOT NULL, contractType VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE plan (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, price DOUBLE PRECISION DEFAULT NULL, quoteLimit INT DEFAULT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE privatenote (id INT AUTO_INCREMENT NOT NULL, project_id INT DEFAULT NULL, user_id INT DEFAULT NULL, note LONGTEXT DEFAULT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, INDEX IDX_FFBFCCE1166D1F9C (project_id), INDEX IDX_FFBFCCE1A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE project (id INT AUTO_INCREMENT NOT NULL, client_id INT DEFAULT NULL, company_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, tags VARCHAR(255) DEFAULT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, INDEX IDX_2FB3D0EE19EB6921 (client_id), INDEX IDX_2FB3D0EE979B1AD6 (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE quote (id INT AUTO_INCREMENT NOT NULL, project_id INT DEFAULT NULL, dueDate DATETIME DEFAULT NULL, taxes DOUBLE PRECISION NOT NULL, version VARCHAR(150) NOT NULL, status INT NOT NULL, profit DOUBLE PRECISION NOT NULL, commission DOUBLE PRECISION NOT NULL, privateNotes LONGTEXT DEFAULT NULL, deadline LONGTEXT DEFAULT NULL, priceDescription LONGTEXT DEFAULT NULL, paymentType LONGTEXT DEFAULT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, INDEX IDX_6B71CBF4166D1F9C (project_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE resource (id INT AUTO_INCREMENT NOT NULL, company_id INT DEFAULT NULL, type_id INT DEFAULT NULL, name VARCHAR(150) NOT NULL, cost DOUBLE PRECISION NOT NULL, equipmentLife INT DEFAULT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, INDEX IDX_BC91F416979B1AD6 (company_id), INDEX IDX_BC91F416C54C8C93 (type_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE resourcequote (id INT AUTO_INCREMENT NOT NULL, resource_id INT DEFAULT NULL, quote_id INT DEFAULT NULL, amount DOUBLE PRECISION NOT NULL, value DOUBLE PRECISION NOT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, INDEX IDX_39741B5589329D25 (resource_id), INDEX IDX_39741B55DB805178 (quote_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE share (id INT AUTO_INCREMENT NOT NULL, quote_id INT DEFAULT NULL, email VARCHAR(150) NOT NULL, hash VARCHAR(255) NOT NULL, shortUrl VARCHAR(255) NOT NULL, sent TINYINT(1) NOT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, INDEX IDX_EF069D5ADB805178 (quote_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE sharenote (id INT AUTO_INCREMENT NOT NULL, share_id INT DEFAULT NULL, note LONGTEXT DEFAULT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, INDEX IDX_F829661E2AE63FDB (share_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, company_id INT DEFAULT NULL, name VARCHAR(150) NOT NULL, email VARCHAR(150) NOT NULL, password VARCHAR(100) NOT NULL, admin TINYINT(1) DEFAULT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), INDEX IDX_8D93D649979B1AD6 (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("CREATE TABLE view (id INT AUTO_INCREMENT NOT NULL, share_id INT DEFAULT NULL, created DATETIME NOT NULL, updated DATETIME DEFAULT NULL, INDEX IDX_FEFDAB8E2AE63FDB (share_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
+ $this->addSql("ALTER TABLE client ADD CONSTRAINT FK_C7440455979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)");
+ $this->addSql("ALTER TABLE company ADD CONSTRAINT FK_4FBF094FE899029B FOREIGN KEY (plan_id) REFERENCES plan (id)");
+ $this->addSql("ALTER TABLE privatenote ADD CONSTRAINT FK_FFBFCCE1166D1F9C FOREIGN KEY (project_id) REFERENCES project (id)");
+ $this->addSql("ALTER TABLE privatenote ADD CONSTRAINT FK_FFBFCCE1A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)");
+ $this->addSql("ALTER TABLE project ADD CONSTRAINT FK_2FB3D0EE19EB6921 FOREIGN KEY (client_id) REFERENCES client (id)");
+ $this->addSql("ALTER TABLE project ADD CONSTRAINT FK_2FB3D0EE979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)");
+ $this->addSql("ALTER TABLE quote ADD CONSTRAINT FK_6B71CBF4166D1F9C FOREIGN KEY (project_id) REFERENCES project (id)");
+ $this->addSql("ALTER TABLE resource ADD CONSTRAINT FK_BC91F416979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)");
+ $this->addSql("ALTER TABLE resource ADD CONSTRAINT FK_BC91F416C54C8C93 FOREIGN KEY (type_id) REFERENCES type (id)");
+ $this->addSql("ALTER TABLE resourcequote ADD CONSTRAINT FK_39741B5589329D25 FOREIGN KEY (resource_id) REFERENCES resource (id)");
+ $this->addSql("ALTER TABLE resourcequote ADD CONSTRAINT FK_39741B55DB805178 FOREIGN KEY (quote_id) REFERENCES quote (id)");
+ $this->addSql("ALTER TABLE share ADD CONSTRAINT FK_EF069D5ADB805178 FOREIGN KEY (quote_id) REFERENCES quote (id)");
+ $this->addSql("ALTER TABLE sharenote ADD CONSTRAINT FK_F829661E2AE63FDB FOREIGN KEY (share_id) REFERENCES share (id)");
+ $this->addSql("ALTER TABLE user ADD CONSTRAINT FK_8D93D649979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)");
+ $this->addSql("ALTER TABLE view ADD CONSTRAINT FK_FEFDAB8E2AE63FDB FOREIGN KEY (share_id) REFERENCES share (id)");
+ }
+
+ public function down(Schema $schema)
+ {
+ $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql", "Migration can only be executed safely on 'mysql'.");
+
+ $this->addSql("ALTER TABLE project DROP FOREIGN KEY FK_2FB3D0EE19EB6921");
+ $this->addSql("ALTER TABLE client DROP FOREIGN KEY FK_C7440455979B1AD6");
+ $this->addSql("ALTER TABLE project DROP FOREIGN KEY FK_2FB3D0EE979B1AD6");
+ $this->addSql("ALTER TABLE resource DROP FOREIGN KEY FK_BC91F416979B1AD6");
+ $this->addSql("ALTER TABLE user DROP FOREIGN KEY FK_8D93D649979B1AD6");
+ $this->addSql("ALTER TABLE resource DROP FOREIGN KEY FK_BC91F416C54C8C93");
+ $this->addSql("ALTER TABLE company DROP FOREIGN KEY FK_4FBF094FE899029B");
+ $this->addSql("ALTER TABLE privatenote DROP FOREIGN KEY FK_FFBFCCE1166D1F9C");
+ $this->addSql("ALTER TABLE quote DROP FOREIGN KEY FK_6B71CBF4166D1F9C");
+ $this->addSql("ALTER TABLE resourcequote DROP FOREIGN KEY FK_39741B55DB805178");
+ $this->addSql("ALTER TABLE share DROP FOREIGN KEY FK_EF069D5ADB805178");
+ $this->addSql("ALTER TABLE resourcequote DROP FOREIGN KEY FK_39741B5589329D25");
+ $this->addSql("ALTER TABLE sharenote DROP FOREIGN KEY FK_F829661E2AE63FDB");
+ $this->addSql("ALTER TABLE view DROP FOREIGN KEY FK_FEFDAB8E2AE63FDB");
+ $this->addSql("ALTER TABLE privatenote DROP FOREIGN KEY FK_FFBFCCE1A76ED395");
+ $this->addSql("DROP TABLE client");
+ $this->addSql("DROP TABLE company");
+ $this->addSql("DROP TABLE type");
+ $this->addSql("DROP TABLE plan");
+ $this->addSql("DROP TABLE privatenote");
+ $this->addSql("DROP TABLE project");
+ $this->addSql("DROP TABLE quote");
+ $this->addSql("DROP TABLE resource");
+ $this->addSql("DROP TABLE resourcequote");
+ $this->addSql("DROP TABLE share");
+ $this->addSql("DROP TABLE sharenote");
+ $this->addSql("DROP TABLE user");
+ $this->addSql("DROP TABLE view");
+ }
+}