From: Roland Haeder Date: Wed, 16 Sep 2015 13:24:48 +0000 (+0200) Subject: added missing customer_number column X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=301338927d5296d29e0ac914265444c8e602112b;p=pizzaservice-ejb.git added missing customer_number column Signed-off-by:Roland Häder --- diff --git a/install/install.sql b/install/install.sql index 12e00c1..a59bab4 100644 --- a/install/install.sql +++ b/install/install.sql @@ -29,9 +29,10 @@ CREATE TABLE IF NOT EXISTS `contacts` ( PRIMARY KEY (`id`) ) ENGINE=InnoDBDEFAULT CHARSET=utf8mb4 COMMENT='Contacts data' ; -CREATE TABLE `customer` ( +CREATE TABLE IF NOT EXISTS `customer` ( `id` bigint(20) unsigned NOT NULL COMMENT 'Primay key', `customer_contact_id` bigint(20) unsigned NOT NULL COMMENT 'Table reference on "contact"', + `customer_number` varchar(20) COLLATE 'utf8mb4_general_ci' NOT NULL COMMENT 'Customer number', `customer_password_hash` varchar(255) COLLATE 'utf8mb4_general_ci' NOT NULL COMMENT 'Password hash', `customer_confirm_key` varchar(50) COLLATE 'utf8mb4_general_ci' NULL DEFAULT NULL COMMENT 'Email confirmation key', `customer_status` enum('UNCONFIRMED','CONFIRMED','LOCKED') COLLATE 'utf8mb4_general_ci' NOT NULL DEFAULT 'UNCONFIRMED' COMMENT 'Account status', @@ -39,6 +40,7 @@ CREATE TABLE `customer` ( `customer_locked` datetime NULL COMMENT 'Last locked timestamp', PRIMARY KEY (`id`), UNIQUE (`customer_confirm_key`), + UNIQUE (`customer_number`), INDEX (`customer_contact_id`) ) COMMENT='Customer data' ENGINE='InnoDB' COLLATE 'utf8mb4_general_ci';