diff --git a/database/migrations/2017_04_16_101744_add_custom_contact_fields.php b/database/migrations/2017_04_16_101744_add_custom_contact_fields.php index f438dcdc630b..62711060ec1d 100644 --- a/database/migrations/2017_04_16_101744_add_custom_contact_fields.php +++ b/database/migrations/2017_04_16_101744_add_custom_contact_fields.php @@ -54,6 +54,81 @@ class AddCustomContactFields extends Migration DB::statement('update frequencies set name = "Annually" where id = 8'); DB::statement('delete from frequencies where id = 9'); } + + /* + Schema::create('projects', function ($table) { + $table->increments('id'); + $table->unsignedInteger('user_id'); + $table->unsignedInteger('account_id')->index(); + $table->unsignedInteger('client_id')->index()->nullable(); + $table->timestamps(); + $table->softDeletes(); + + $table->string('name')->nullable(); + $table->boolean('is_deleted')->default(false); + + $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); + $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); + $table->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); + + $table->unsignedInteger('public_id')->index(); + $table->unique(['account_id', 'public_id']); + }); + */ + + Schema::create('db_servers', function ($table) { + $table->increments('id'); + $table->string('name'); + }); + + Schema::create('lookup_companies', function ($table) { + $table->increments('id'); + $table->unsignedInteger('db_server_id'); + + $table->foreign('db_server_id')->references('id')->on('db_servers'); + }); + + Schema::create('lookup_accounts', function ($table) { + $table->increments('id'); + $table->unsignedInteger('lookup_company_id')->index(); + $table->string('account_key'); + + $table->foreign('lookup_company_id')->references('id')->on('lookup_companies')->onDelete('cascade'); + }); + + Schema::create('lookup_users', function ($table) { + $table->increments('id'); + $table->unsignedInteger('lookup_account_id')->index(); + $table->string('email'); + + $table->foreign('lookup_account_id')->references('id')->on('lookup_accounts')->onDelete('cascade'); + }); + + Schema::create('lookup_contacts', function ($table) { + $table->increments('id'); + $table->unsignedInteger('lookup_account_id')->index(); + $table->string('contact_key'); + + $table->foreign('lookup_account_id')->references('id')->on('lookup_accounts')->onDelete('cascade'); + }); + + Schema::create('lookup_invitations', function ($table) { + $table->increments('id'); + $table->unsignedInteger('lookup_account_id')->index(); + $table->string('invitation_key'); + $table->string('message_id'); + + $table->foreign('lookup_account_id')->references('id')->on('lookup_accounts')->onDelete('cascade'); + }); + + Schema::create('lookup_tokens', function ($table) { + $table->increments('id'); + $table->unsignedInteger('lookup_account_id')->index(); + $table->string('token'); + + $table->foreign('lookup_account_id')->references('id')->on('lookup_accounts')->onDelete('cascade'); + }); + } /** @@ -79,5 +154,13 @@ class AddCustomContactFields extends Migration $table->dropColumn('transaction_reference'); $table->dropColumn('invoice_documents'); }); + + Schema::dropIfExists('db_servers'); + Schema::dropIfExists('lookup_companies'); + Schema::dropIfExists('lookup_accounts'); + Schema::dropIfExists('lookup_users'); + Schema::dropIfExists('lookup_contacts'); + Schema::dropIfExists('lookup_invitations'); + Schema::dropIfExists('lookup_tokens'); } } diff --git a/database/setup.sql b/database/setup.sql index a61948a32833..9f042032fd5a 100644 --- a/database/setup.sql +++ b/database/setup.sql @@ -899,6 +899,29 @@ INSERT INTO `datetime_formats` VALUES (1,'d/M/Y g:i a','DD/MMM/YYYY h:mm:ss a'), /*!40000 ALTER TABLE `datetime_formats` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `db_servers` +-- + +DROP TABLE IF EXISTS `db_servers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `db_servers` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `db_servers` +-- + +LOCK TABLES `db_servers` WRITE; +/*!40000 ALTER TABLE `db_servers` DISABLE KEYS */; +/*!40000 ALTER TABLE `db_servers` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `documents` -- @@ -1186,7 +1209,7 @@ CREATE TABLE `gateways` ( LOCK TABLES `gateways` WRITE; /*!40000 ALTER TABLE `gateways` DISABLE KEYS */; -INSERT INTO `gateways` VALUES (1,'2017-04-28 09:15:42','2017-04-28 09:15:42','Authorize.Net AIM','AuthorizeNet_AIM',1,1,4,0,NULL,0,0),(2,'2017-04-28 09:15:42','2017-04-28 09:15:42','Authorize.Net SIM','AuthorizeNet_SIM',1,2,10000,0,NULL,0,0),(3,'2017-04-28 09:15:42','2017-04-28 09:15:42','CardSave','CardSave',1,1,10000,0,NULL,0,0),(4,'2017-04-28 09:15:42','2017-04-28 09:15:42','Eway Rapid','Eway_RapidShared',1,1,10000,0,NULL,1,0),(5,'2017-04-28 09:15:42','2017-04-28 09:15:42','FirstData Connect','FirstData_Connect',1,1,10000,0,NULL,0,0),(6,'2017-04-28 09:15:42','2017-04-28 09:15:42','GoCardless','GoCardless',1,1,10000,0,NULL,1,0),(7,'2017-04-28 09:15:42','2017-04-28 09:15:42','Migs ThreeParty','Migs_ThreeParty',1,1,10000,0,NULL,0,0),(8,'2017-04-28 09:15:42','2017-04-28 09:15:42','Migs TwoParty','Migs_TwoParty',1,1,10000,0,NULL,0,0),(9,'2017-04-28 09:15:42','2017-04-28 09:15:42','Mollie','Mollie',1,1,7,0,NULL,1,0),(10,'2017-04-28 09:15:42','2017-04-28 09:15:42','MultiSafepay','MultiSafepay',1,1,10000,0,NULL,0,0),(11,'2017-04-28 09:15:42','2017-04-28 09:15:42','Netaxept','Netaxept',1,1,10000,0,NULL,0,0),(12,'2017-04-28 09:15:42','2017-04-28 09:15:42','NetBanx','NetBanx',1,1,10000,0,NULL,0,0),(13,'2017-04-28 09:15:42','2017-04-28 09:15:42','PayFast','PayFast',1,1,10000,0,NULL,1,0),(14,'2017-04-28 09:15:42','2017-04-28 09:15:42','Payflow Pro','Payflow_Pro',1,1,10000,0,NULL,0,0),(15,'2017-04-28 09:15:42','2017-04-28 09:15:42','PaymentExpress PxPay','PaymentExpress_PxPay',1,1,10000,0,NULL,0,0),(16,'2017-04-28 09:15:42','2017-04-28 09:15:42','PaymentExpress PxPost','PaymentExpress_PxPost',1,1,10000,0,NULL,0,0),(17,'2017-04-28 09:15:42','2017-04-28 09:15:42','PayPal Express','PayPal_Express',1,1,3,0,NULL,1,0),(18,'2017-04-28 09:15:42','2017-04-28 09:15:42','PayPal Pro','PayPal_Pro',1,1,10000,0,NULL,0,0),(19,'2017-04-28 09:15:42','2017-04-28 09:15:42','Pin','Pin',1,1,10000,0,NULL,0,0),(20,'2017-04-28 09:15:42','2017-04-28 09:15:42','SagePay Direct','SagePay_Direct',1,1,10000,0,NULL,0,0),(21,'2017-04-28 09:15:42','2017-04-28 09:15:42','SagePay Server','SagePay_Server',1,1,10000,0,NULL,0,0),(22,'2017-04-28 09:15:42','2017-04-28 09:15:42','SecurePay DirectPost','SecurePay_DirectPost',1,1,10000,0,NULL,0,0),(23,'2017-04-28 09:15:42','2017-04-28 09:15:42','Stripe','Stripe',1,1,1,0,NULL,0,0),(24,'2017-04-28 09:15:42','2017-04-28 09:15:42','TargetPay Direct eBanking','TargetPay_Directebanking',1,1,10000,0,NULL,0,0),(25,'2017-04-28 09:15:42','2017-04-28 09:15:42','TargetPay Ideal','TargetPay_Ideal',1,1,10000,0,NULL,0,0),(26,'2017-04-28 09:15:42','2017-04-28 09:15:42','TargetPay Mr Cash','TargetPay_Mrcash',1,1,10000,0,NULL,0,0),(27,'2017-04-28 09:15:42','2017-04-28 09:15:42','TwoCheckout','TwoCheckout',1,1,10000,0,NULL,1,0),(28,'2017-04-28 09:15:42','2017-04-28 09:15:42','WorldPay','WorldPay',1,1,10000,0,NULL,0,0),(29,'2017-04-28 09:15:42','2017-04-28 09:15:42','BeanStream','BeanStream',1,2,10000,0,NULL,0,0),(30,'2017-04-28 09:15:42','2017-04-28 09:15:42','Psigate','Psigate',1,2,10000,0,NULL,0,0),(31,'2017-04-28 09:15:42','2017-04-28 09:15:42','moolah','AuthorizeNet_AIM',1,1,10000,0,NULL,0,0),(32,'2017-04-28 09:15:42','2017-04-28 09:15:42','Alipay','Alipay_Express',1,1,10000,0,NULL,0,0),(33,'2017-04-28 09:15:42','2017-04-28 09:15:42','Buckaroo','Buckaroo_CreditCard',1,1,10000,0,NULL,0,0),(34,'2017-04-28 09:15:42','2017-04-28 09:15:42','Coinbase','Coinbase',1,1,10000,0,NULL,0,0),(35,'2017-04-28 09:15:42','2017-04-28 09:15:42','DataCash','DataCash',1,1,10000,0,NULL,0,0),(36,'2017-04-28 09:15:42','2017-04-28 09:15:42','Neteller','Neteller',1,2,10000,0,NULL,0,0),(37,'2017-04-28 09:15:42','2017-04-28 09:15:42','Pacnet','Pacnet',1,1,10000,0,NULL,0,0),(38,'2017-04-28 09:15:42','2017-04-28 09:15:42','PaymentSense','PaymentSense',1,2,10000,0,NULL,0,0),(39,'2017-04-28 09:15:42','2017-04-28 09:15:42','Realex','Realex_Remote',1,1,10000,0,NULL,0,0),(40,'2017-04-28 09:15:42','2017-04-28 09:15:42','Sisow','Sisow',1,1,10000,0,NULL,0,0),(41,'2017-04-28 09:15:42','2017-04-28 09:15:42','Skrill','Skrill',1,1,10000,0,NULL,1,0),(42,'2017-04-28 09:15:42','2017-04-28 09:15:42','BitPay','BitPay',1,1,6,0,NULL,1,0),(43,'2017-04-28 09:15:42','2017-04-28 09:15:42','Dwolla','Dwolla',1,1,5,0,NULL,1,0),(44,'2017-04-28 09:15:42','2017-04-28 09:15:42','AGMS','Agms',1,1,10000,0,NULL,0,0),(45,'2017-04-28 09:15:42','2017-04-28 09:15:42','Barclays','BarclaysEpdq\\Essential',1,1,10000,0,NULL,0,0),(46,'2017-04-28 09:15:42','2017-04-28 09:15:42','Cardgate','Cardgate',1,1,10000,0,NULL,0,0),(47,'2017-04-28 09:15:42','2017-04-28 09:15:42','Checkout.com','CheckoutCom',1,1,10000,0,NULL,0,0),(48,'2017-04-28 09:15:42','2017-04-28 09:15:42','Creditcall','Creditcall',1,1,10000,0,NULL,0,0),(49,'2017-04-28 09:15:42','2017-04-28 09:15:42','Cybersource','Cybersource',1,1,10000,0,NULL,0,0),(50,'2017-04-28 09:15:42','2017-04-28 09:15:42','ecoPayz','Ecopayz',1,1,10000,0,NULL,0,0),(51,'2017-04-28 09:15:42','2017-04-28 09:15:42','Fasapay','Fasapay',1,1,10000,0,NULL,0,0),(52,'2017-04-28 09:15:42','2017-04-28 09:15:42','Komoju','Komoju',1,1,10000,0,NULL,0,0),(53,'2017-04-28 09:15:42','2017-04-28 09:15:42','Multicards','Multicards',1,1,10000,0,NULL,0,0),(54,'2017-04-28 09:15:42','2017-04-28 09:15:42','Pagar.Me','Pagarme',1,2,10000,0,NULL,0,0),(55,'2017-04-28 09:15:42','2017-04-28 09:15:42','Paysafecard','Paysafecard',1,1,10000,0,NULL,0,0),(56,'2017-04-28 09:15:42','2017-04-28 09:15:42','Paytrace','Paytrace_CreditCard',1,1,10000,0,NULL,0,0),(57,'2017-04-28 09:15:42','2017-04-28 09:15:42','Secure Trading','SecureTrading',1,1,10000,0,NULL,0,0),(58,'2017-04-28 09:15:42','2017-04-28 09:15:42','SecPay','SecPay',1,1,10000,0,NULL,0,0),(59,'2017-04-28 09:15:42','2017-04-28 09:15:42','WeChat Express','WeChat_Express',1,2,10000,0,NULL,0,0),(60,'2017-04-28 09:15:42','2017-04-28 09:15:42','WePay','WePay',1,1,10000,0,NULL,0,0),(61,'2017-04-28 09:15:42','2017-04-28 09:15:42','Braintree','Braintree',1,1,2,0,NULL,0,0),(62,'2017-04-28 09:15:42','2017-04-28 09:15:42','Custom','Custom',1,1,8,0,NULL,1,0); +INSERT INTO `gateways` VALUES (1,'2017-04-30 10:36:46','2017-04-30 10:36:46','Authorize.Net AIM','AuthorizeNet_AIM',1,1,4,0,NULL,0,0),(2,'2017-04-30 10:36:46','2017-04-30 10:36:46','Authorize.Net SIM','AuthorizeNet_SIM',1,2,10000,0,NULL,0,0),(3,'2017-04-30 10:36:46','2017-04-30 10:36:46','CardSave','CardSave',1,1,10000,0,NULL,0,0),(4,'2017-04-30 10:36:46','2017-04-30 10:36:46','Eway Rapid','Eway_RapidShared',1,1,10000,0,NULL,1,0),(5,'2017-04-30 10:36:46','2017-04-30 10:36:46','FirstData Connect','FirstData_Connect',1,1,10000,0,NULL,0,0),(6,'2017-04-30 10:36:46','2017-04-30 10:36:46','GoCardless','GoCardless',1,1,10000,0,NULL,1,0),(7,'2017-04-30 10:36:46','2017-04-30 10:36:46','Migs ThreeParty','Migs_ThreeParty',1,1,10000,0,NULL,0,0),(8,'2017-04-30 10:36:46','2017-04-30 10:36:46','Migs TwoParty','Migs_TwoParty',1,1,10000,0,NULL,0,0),(9,'2017-04-30 10:36:46','2017-04-30 10:36:46','Mollie','Mollie',1,1,7,0,NULL,1,0),(10,'2017-04-30 10:36:46','2017-04-30 10:36:46','MultiSafepay','MultiSafepay',1,1,10000,0,NULL,0,0),(11,'2017-04-30 10:36:46','2017-04-30 10:36:46','Netaxept','Netaxept',1,1,10000,0,NULL,0,0),(12,'2017-04-30 10:36:46','2017-04-30 10:36:46','NetBanx','NetBanx',1,1,10000,0,NULL,0,0),(13,'2017-04-30 10:36:46','2017-04-30 10:36:46','PayFast','PayFast',1,1,10000,0,NULL,1,0),(14,'2017-04-30 10:36:46','2017-04-30 10:36:46','Payflow Pro','Payflow_Pro',1,1,10000,0,NULL,0,0),(15,'2017-04-30 10:36:46','2017-04-30 10:36:46','PaymentExpress PxPay','PaymentExpress_PxPay',1,1,10000,0,NULL,0,0),(16,'2017-04-30 10:36:46','2017-04-30 10:36:46','PaymentExpress PxPost','PaymentExpress_PxPost',1,1,10000,0,NULL,0,0),(17,'2017-04-30 10:36:46','2017-04-30 10:36:46','PayPal Express','PayPal_Express',1,1,3,0,NULL,1,0),(18,'2017-04-30 10:36:46','2017-04-30 10:36:46','PayPal Pro','PayPal_Pro',1,1,10000,0,NULL,0,0),(19,'2017-04-30 10:36:46','2017-04-30 10:36:46','Pin','Pin',1,1,10000,0,NULL,0,0),(20,'2017-04-30 10:36:46','2017-04-30 10:36:46','SagePay Direct','SagePay_Direct',1,1,10000,0,NULL,0,0),(21,'2017-04-30 10:36:46','2017-04-30 10:36:46','SagePay Server','SagePay_Server',1,1,10000,0,NULL,0,0),(22,'2017-04-30 10:36:46','2017-04-30 10:36:46','SecurePay DirectPost','SecurePay_DirectPost',1,1,10000,0,NULL,0,0),(23,'2017-04-30 10:36:47','2017-04-30 10:36:47','Stripe','Stripe',1,1,1,0,NULL,0,0),(24,'2017-04-30 10:36:47','2017-04-30 10:36:47','TargetPay Direct eBanking','TargetPay_Directebanking',1,1,10000,0,NULL,0,0),(25,'2017-04-30 10:36:47','2017-04-30 10:36:47','TargetPay Ideal','TargetPay_Ideal',1,1,10000,0,NULL,0,0),(26,'2017-04-30 10:36:47','2017-04-30 10:36:47','TargetPay Mr Cash','TargetPay_Mrcash',1,1,10000,0,NULL,0,0),(27,'2017-04-30 10:36:47','2017-04-30 10:36:47','TwoCheckout','TwoCheckout',1,1,10000,0,NULL,1,0),(28,'2017-04-30 10:36:47','2017-04-30 10:36:47','WorldPay','WorldPay',1,1,10000,0,NULL,0,0),(29,'2017-04-30 10:36:47','2017-04-30 10:36:47','BeanStream','BeanStream',1,2,10000,0,NULL,0,0),(30,'2017-04-30 10:36:47','2017-04-30 10:36:47','Psigate','Psigate',1,2,10000,0,NULL,0,0),(31,'2017-04-30 10:36:47','2017-04-30 10:36:47','moolah','AuthorizeNet_AIM',1,1,10000,0,NULL,0,0),(32,'2017-04-30 10:36:47','2017-04-30 10:36:47','Alipay','Alipay_Express',1,1,10000,0,NULL,0,0),(33,'2017-04-30 10:36:47','2017-04-30 10:36:47','Buckaroo','Buckaroo_CreditCard',1,1,10000,0,NULL,0,0),(34,'2017-04-30 10:36:47','2017-04-30 10:36:47','Coinbase','Coinbase',1,1,10000,0,NULL,0,0),(35,'2017-04-30 10:36:47','2017-04-30 10:36:47','DataCash','DataCash',1,1,10000,0,NULL,0,0),(36,'2017-04-30 10:36:47','2017-04-30 10:36:47','Neteller','Neteller',1,2,10000,0,NULL,0,0),(37,'2017-04-30 10:36:47','2017-04-30 10:36:47','Pacnet','Pacnet',1,1,10000,0,NULL,0,0),(38,'2017-04-30 10:36:47','2017-04-30 10:36:47','PaymentSense','PaymentSense',1,2,10000,0,NULL,0,0),(39,'2017-04-30 10:36:47','2017-04-30 10:36:47','Realex','Realex_Remote',1,1,10000,0,NULL,0,0),(40,'2017-04-30 10:36:47','2017-04-30 10:36:47','Sisow','Sisow',1,1,10000,0,NULL,0,0),(41,'2017-04-30 10:36:47','2017-04-30 10:36:47','Skrill','Skrill',1,1,10000,0,NULL,1,0),(42,'2017-04-30 10:36:47','2017-04-30 10:36:47','BitPay','BitPay',1,1,6,0,NULL,1,0),(43,'2017-04-30 10:36:47','2017-04-30 10:36:47','Dwolla','Dwolla',1,1,5,0,NULL,1,0),(44,'2017-04-30 10:36:47','2017-04-30 10:36:47','AGMS','Agms',1,1,10000,0,NULL,0,0),(45,'2017-04-30 10:36:47','2017-04-30 10:36:47','Barclays','BarclaysEpdq\\Essential',1,1,10000,0,NULL,0,0),(46,'2017-04-30 10:36:47','2017-04-30 10:36:47','Cardgate','Cardgate',1,1,10000,0,NULL,0,0),(47,'2017-04-30 10:36:47','2017-04-30 10:36:47','Checkout.com','CheckoutCom',1,1,10000,0,NULL,0,0),(48,'2017-04-30 10:36:47','2017-04-30 10:36:47','Creditcall','Creditcall',1,1,10000,0,NULL,0,0),(49,'2017-04-30 10:36:47','2017-04-30 10:36:47','Cybersource','Cybersource',1,1,10000,0,NULL,0,0),(50,'2017-04-30 10:36:47','2017-04-30 10:36:47','ecoPayz','Ecopayz',1,1,10000,0,NULL,0,0),(51,'2017-04-30 10:36:47','2017-04-30 10:36:47','Fasapay','Fasapay',1,1,10000,0,NULL,0,0),(52,'2017-04-30 10:36:47','2017-04-30 10:36:47','Komoju','Komoju',1,1,10000,0,NULL,0,0),(53,'2017-04-30 10:36:47','2017-04-30 10:36:47','Multicards','Multicards',1,1,10000,0,NULL,0,0),(54,'2017-04-30 10:36:47','2017-04-30 10:36:47','Pagar.Me','Pagarme',1,2,10000,0,NULL,0,0),(55,'2017-04-30 10:36:47','2017-04-30 10:36:47','Paysafecard','Paysafecard',1,1,10000,0,NULL,0,0),(56,'2017-04-30 10:36:47','2017-04-30 10:36:47','Paytrace','Paytrace_CreditCard',1,1,10000,0,NULL,0,0),(57,'2017-04-30 10:36:47','2017-04-30 10:36:47','Secure Trading','SecureTrading',1,1,10000,0,NULL,0,0),(58,'2017-04-30 10:36:47','2017-04-30 10:36:47','SecPay','SecPay',1,1,10000,0,NULL,0,0),(59,'2017-04-30 10:36:47','2017-04-30 10:36:47','WeChat Express','WeChat_Express',1,2,10000,0,NULL,0,0),(60,'2017-04-30 10:36:47','2017-04-30 10:36:47','WePay','WePay',1,1,10000,0,NULL,0,0),(61,'2017-04-30 10:36:47','2017-04-30 10:36:47','Braintree','Braintree',1,1,2,0,NULL,0,0),(62,'2017-04-30 10:36:47','2017-04-30 10:36:47','Custom','Custom',1,1,8,0,NULL,1,0); /*!40000 ALTER TABLE `gateways` ENABLE KEYS */; UNLOCK TABLES; @@ -1534,6 +1557,162 @@ LOCK TABLES `licenses` WRITE; /*!40000 ALTER TABLE `licenses` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `lookup_accounts` +-- + +DROP TABLE IF EXISTS `lookup_accounts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `lookup_accounts` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lookup_company_id` int(10) unsigned NOT NULL, + `account_key` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `lookup_accounts_lookup_company_id_index` (`lookup_company_id`), + CONSTRAINT `lookup_accounts_lookup_company_id_foreign` FOREIGN KEY (`lookup_company_id`) REFERENCES `lookup_companies` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `lookup_accounts` +-- + +LOCK TABLES `lookup_accounts` WRITE; +/*!40000 ALTER TABLE `lookup_accounts` DISABLE KEYS */; +/*!40000 ALTER TABLE `lookup_accounts` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `lookup_companies` +-- + +DROP TABLE IF EXISTS `lookup_companies`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `lookup_companies` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `db_server_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `lookup_companies_db_server_id_foreign` (`db_server_id`), + CONSTRAINT `lookup_companies_db_server_id_foreign` FOREIGN KEY (`db_server_id`) REFERENCES `db_servers` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `lookup_companies` +-- + +LOCK TABLES `lookup_companies` WRITE; +/*!40000 ALTER TABLE `lookup_companies` DISABLE KEYS */; +/*!40000 ALTER TABLE `lookup_companies` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `lookup_contacts` +-- + +DROP TABLE IF EXISTS `lookup_contacts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `lookup_contacts` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lookup_account_id` int(10) unsigned NOT NULL, + `contact_key` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `lookup_contacts_lookup_account_id_index` (`lookup_account_id`), + CONSTRAINT `lookup_contacts_lookup_account_id_foreign` FOREIGN KEY (`lookup_account_id`) REFERENCES `lookup_accounts` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `lookup_contacts` +-- + +LOCK TABLES `lookup_contacts` WRITE; +/*!40000 ALTER TABLE `lookup_contacts` DISABLE KEYS */; +/*!40000 ALTER TABLE `lookup_contacts` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `lookup_invitations` +-- + +DROP TABLE IF EXISTS `lookup_invitations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `lookup_invitations` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lookup_account_id` int(10) unsigned NOT NULL, + `invitation_key` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `message_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `lookup_invitations_lookup_account_id_index` (`lookup_account_id`), + CONSTRAINT `lookup_invitations_lookup_account_id_foreign` FOREIGN KEY (`lookup_account_id`) REFERENCES `lookup_accounts` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `lookup_invitations` +-- + +LOCK TABLES `lookup_invitations` WRITE; +/*!40000 ALTER TABLE `lookup_invitations` DISABLE KEYS */; +/*!40000 ALTER TABLE `lookup_invitations` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `lookup_tokens` +-- + +DROP TABLE IF EXISTS `lookup_tokens`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `lookup_tokens` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lookup_account_id` int(10) unsigned NOT NULL, + `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `lookup_tokens_lookup_account_id_index` (`lookup_account_id`), + CONSTRAINT `lookup_tokens_lookup_account_id_foreign` FOREIGN KEY (`lookup_account_id`) REFERENCES `lookup_accounts` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `lookup_tokens` +-- + +LOCK TABLES `lookup_tokens` WRITE; +/*!40000 ALTER TABLE `lookup_tokens` DISABLE KEYS */; +/*!40000 ALTER TABLE `lookup_tokens` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `lookup_users` +-- + +DROP TABLE IF EXISTS `lookup_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `lookup_users` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lookup_account_id` int(10) unsigned NOT NULL, + `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `lookup_users_lookup_account_id_index` (`lookup_account_id`), + CONSTRAINT `lookup_users_lookup_account_id_foreign` FOREIGN KEY (`lookup_account_id`) REFERENCES `lookup_accounts` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `lookup_users` +-- + +LOCK TABLES `lookup_users` WRITE; +/*!40000 ALTER TABLE `lookup_users` DISABLE KEYS */; +/*!40000 ALTER TABLE `lookup_users` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `migrations` -- @@ -1604,7 +1783,7 @@ CREATE TABLE `payment_libraries` ( LOCK TABLES `payment_libraries` WRITE; /*!40000 ALTER TABLE `payment_libraries` DISABLE KEYS */; -INSERT INTO `payment_libraries` VALUES (1,'2017-04-28 09:15:40','2017-04-28 09:15:40','Omnipay',1),(2,'2017-04-28 09:15:40','2017-04-28 09:15:40','PHP-Payments [Deprecated]',1); +INSERT INTO `payment_libraries` VALUES (1,'2017-04-30 10:36:45','2017-04-30 10:36:45','Omnipay',1),(2,'2017-04-30 10:36:45','2017-04-30 10:36:45','PHP-Payments [Deprecated]',1); /*!40000 ALTER TABLE `payment_libraries` ENABLE KEYS */; UNLOCK TABLES; @@ -1714,7 +1893,7 @@ CREATE TABLE `payment_terms` ( LOCK TABLES `payment_terms` WRITE; /*!40000 ALTER TABLE `payment_terms` DISABLE KEYS */; -INSERT INTO `payment_terms` VALUES (1,7,'Net 7','2017-04-28 09:15:40','2017-04-28 09:15:40',NULL,0,0,1),(2,10,'Net 10','2017-04-28 09:15:40','2017-04-28 09:15:40',NULL,0,0,2),(3,14,'Net 14','2017-04-28 09:15:40','2017-04-28 09:15:40',NULL,0,0,3),(4,15,'Net 15','2017-04-28 09:15:40','2017-04-28 09:15:40',NULL,0,0,4),(5,30,'Net 30','2017-04-28 09:15:40','2017-04-28 09:15:40',NULL,0,0,5),(6,60,'Net 60','2017-04-28 09:15:40','2017-04-28 09:15:40',NULL,0,0,6),(7,90,'Net 90','2017-04-28 09:15:40','2017-04-28 09:15:40',NULL,0,0,7),(8,-1,'Net 0','2017-04-28 09:15:44','2017-04-28 09:15:44',NULL,0,0,0); +INSERT INTO `payment_terms` VALUES (1,7,'Net 7','2017-04-30 10:36:45','2017-04-30 10:36:45',NULL,0,0,1),(2,10,'Net 10','2017-04-30 10:36:45','2017-04-30 10:36:45',NULL,0,0,2),(3,14,'Net 14','2017-04-30 10:36:45','2017-04-30 10:36:45',NULL,0,0,3),(4,15,'Net 15','2017-04-30 10:36:45','2017-04-30 10:36:45',NULL,0,0,4),(5,30,'Net 30','2017-04-30 10:36:45','2017-04-30 10:36:45',NULL,0,0,5),(6,60,'Net 60','2017-04-30 10:36:45','2017-04-30 10:36:45',NULL,0,0,6),(7,90,'Net 90','2017-04-30 10:36:45','2017-04-30 10:36:45',NULL,0,0,7),(8,-1,'Net 0','2017-04-30 10:36:48','2017-04-30 10:36:48',NULL,0,0,0); /*!40000 ALTER TABLE `payment_terms` ENABLE KEYS */; UNLOCK TABLES; @@ -2309,4 +2488,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2017-04-28 15:15:45 +-- Dump completed on 2017-04-30 16:36:49