From 301338927d5296d29e0ac914265444c8e602112b Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 16 Sep 2015 15:24:48 +0200 Subject: [PATCH] =?utf8?q?added=20missing=20customer=5Fnumber=20column=20S?= =?utf8?q?igned-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- install/install.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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'; -- 2.39.5