From e4a411797a3d2bd5c2a918d4c110dc5765454cda Mon Sep 17 00:00:00 2001 From: Taras Machyshyn Date: Thu, 1 May 2014 14:04:40 +0300 Subject: [PATCH 1/2] fixed autoincrement field --- .../Utils/Database/DBAL/Schema/Column.php | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/application/Espo/Core/Utils/Database/DBAL/Schema/Column.php b/application/Espo/Core/Utils/Database/DBAL/Schema/Column.php index af463ec011..ceb0e9aa97 100644 --- a/application/Espo/Core/Utils/Database/DBAL/Schema/Column.php +++ b/application/Espo/Core/Utils/Database/DBAL/Schema/Column.php @@ -31,4 +31,52 @@ class Column extends \Doctrine\DBAL\Schema\Column */ protected $_notnull = false; + /** + * @var boolean + */ + protected $_unique = false; + + + /** + * @param boolean $unique + * + * @return \Doctrine\DBAL\Schema\Column + */ + public function setUnique($unique) + { + $this->_unique = (bool)$unique; + + return $this; + } + + /** + * @return boolean + */ + public function getUnique() + { + return $this->_unique; + } + + /** + * @return array + */ + public function toArray() + { + return array_merge(array( + 'name' => $this->_name, + 'type' => $this->_type, + 'default' => $this->_default, + 'notnull' => $this->_notnull, + 'length' => $this->_length, + 'precision' => $this->_precision, + 'scale' => $this->_scale, + 'fixed' => $this->_fixed, + 'unsigned' => $this->_unsigned, + 'autoincrement' => $this->_autoincrement, + 'unique' => $this->_unique, + 'columnDefinition' => $this->_columnDefinition, + 'comment' => $this->_comment, + ), $this->_platformOptions, $this->_customSchemaOptions); + } + } \ No newline at end of file From 17d954f5f5b76d3104ed3b94bf9d2739eeb36390 Mon Sep 17 00:00:00 2001 From: Taras Machyshyn Date: Thu, 1 May 2014 15:14:26 +0300 Subject: [PATCH 2/2] removed email type from Field Manager --- application/Espo/Resources/metadata/fields/email.json | 1 + 1 file changed, 1 insertion(+) diff --git a/application/Espo/Resources/metadata/fields/email.json b/application/Espo/Resources/metadata/fields/email.json index ef96abe8e2..0defab3acf 100644 --- a/application/Espo/Resources/metadata/fields/email.json +++ b/application/Espo/Resources/metadata/fields/email.json @@ -10,6 +10,7 @@ "type":"int" } ], + "notCreatable": true, "search":{ "basic":true, "advanced":true