From cf0fdae9bedff946bbab9cc1a6bbfa8bd888119e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 27 Feb 2017 18:02:14 +0200 Subject: [PATCH] Update setup.sql --- database/setup.sql | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/database/setup.sql b/database/setup.sql index bce72f5aa89b..879bca6072f6 100644 --- a/database/setup.sql +++ b/database/setup.sql @@ -30,6 +30,12 @@ CREATE TABLE `account_gateway_settings` ( `updated_at` timestamp NULL DEFAULT NULL, `min_limit` int(10) unsigned DEFAULT NULL, `max_limit` int(10) unsigned DEFAULT NULL, + `fee_amount` decimal(13,2) DEFAULT NULL, + `fee_percent` decimal(13,3) DEFAULT NULL, + `fee_tax_name1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `fee_tax_name2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `fee_tax_rate1` decimal(13,3) DEFAULT NULL, + `fee_tax_rate2` decimal(13,3) DEFAULT NULL, PRIMARY KEY (`id`), KEY `account_gateway_settings_account_id_foreign` (`account_id`), KEY `account_gateway_settings_user_id_foreign` (`user_id`), @@ -317,6 +323,8 @@ CREATE TABLE `accounts` ( `client_number_pattern` text COLLATE utf8_unicode_ci, `domain_id` tinyint(3) unsigned DEFAULT '1', `payment_terms` tinyint(4) DEFAULT NULL, + `reset_counter_frequency_id` smallint(6) DEFAULT NULL, + `payment_type_id` smallint(6) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `accounts_account_key_unique` (`account_key`), KEY `accounts_timezone_id_foreign` (`timezone_id`), @@ -792,7 +800,7 @@ CREATE TABLE `currencies` ( `code` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `swap_currency_symbol` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -801,7 +809,7 @@ CREATE TABLE `currencies` ( LOCK TABLES `currencies` WRITE; /*!40000 ALTER TABLE `currencies` DISABLE KEYS */; -INSERT INTO `currencies` VALUES (1,'US Dollar','$','2',',','.','USD',0),(2,'British Pound','£','2',',','.','GBP',0),(3,'Euro','€','2','.',',','EUR',0),(4,'South African Rand','R','2','.',',','ZAR',0),(5,'Danish Krone','kr','2','.',',','DKK',1),(6,'Israeli Shekel','NIS ','2',',','.','ILS',0),(7,'Swedish Krona','kr','2','.',',','SEK',1),(8,'Kenyan Shilling','KSh ','2',',','.','KES',0),(9,'Canadian Dollar','C$','2',',','.','CAD',0),(10,'Philippine Peso','P ','2',',','.','PHP',0),(11,'Indian Rupee','Rs. ','2',',','.','INR',0),(12,'Australian Dollar','$','2',',','.','AUD',0),(13,'Singapore Dollar','','2',',','.','SGD',0),(14,'Norske Kroner','kr','2','.',',','NOK',1),(15,'New Zealand Dollar','$','2',',','.','NZD',0),(16,'Vietnamese Dong','','0','.',',','VND',0),(17,'Swiss Franc','','2','\'','.','CHF',0),(18,'Guatemalan Quetzal','Q','2',',','.','GTQ',0),(19,'Malaysian Ringgit','RM','2',',','.','MYR',0),(20,'Brazilian Real','R$','2','.',',','BRL',0),(21,'Thai Baht','','2',',','.','THB',0),(22,'Nigerian Naira','','2',',','.','NGN',0),(23,'Argentine Peso','$','2','.',',','ARS',0),(24,'Bangladeshi Taka','Tk','2',',','.','BDT',0),(25,'United Arab Emirates Dirham','DH ','2',',','.','AED',0),(26,'Hong Kong Dollar','','2',',','.','HKD',0),(27,'Indonesian Rupiah','Rp','2',',','.','IDR',0),(28,'Mexican Peso','$','2',',','.','MXN',0),(29,'Egyptian Pound','E£','2',',','.','EGP',0),(30,'Colombian Peso','$','2','.',',','COP',0),(31,'West African Franc','CFA ','2',',','.','XOF',0),(32,'Chinese Renminbi','RMB ','2',',','.','CNY',0),(33,'Rwandan Franc','RF ','2',',','.','RWF',0),(34,'Tanzanian Shilling','TSh ','2',',','.','TZS',0),(35,'Netherlands Antillean Guilder','','2','.',',','ANG',0),(36,'Trinidad and Tobago Dollar','TT$','2',',','.','TTD',0),(37,'East Caribbean Dollar','EC$','2',',','.','XCD',0),(38,'Ghanaian Cedi','','2',',','.','GHS',0),(39,'Bulgarian Lev','','2',' ','.','BGN',0),(40,'Aruban Florin','Afl. ','2',' ','.','AWG',0),(41,'Turkish Lira','TL ','2','.',',','TRY',0),(42,'Romanian New Leu','','2',',','.','RON',0),(43,'Croatian Kuna','kn','2','.',',','HKR',0),(44,'Saudi Riyal','','2',',','.','SAR',0),(45,'Japanese Yen','¥','0',',','.','JPY',0),(46,'Maldivian Rufiyaa','','2',',','.','MVR',0),(47,'Costa Rican Colón','','2',',','.','CRC',0),(48,'Pakistani Rupee','Rs ','0',',','.','PKR',0),(49,'Polish Zloty','zł','2',' ',',','PLN',1),(50,'Sri Lankan Rupee','LKR','2',',','.','LKR',1),(51,'Czech Koruna','Kč','2',' ',',','CZK',1),(52,'Uruguayan Peso','$','2','.',',','UYU',0),(53,'Namibian Dollar','$','2',',','.','NAD',0); +INSERT INTO `currencies` VALUES (1,'US Dollar','$','2',',','.','USD',0),(2,'British Pound','£','2',',','.','GBP',0),(3,'Euro','€','2','.',',','EUR',0),(4,'South African Rand','R','2','.',',','ZAR',0),(5,'Danish Krone','kr','2','.',',','DKK',1),(6,'Israeli Shekel','NIS ','2',',','.','ILS',0),(7,'Swedish Krona','kr','2','.',',','SEK',1),(8,'Kenyan Shilling','KSh ','2',',','.','KES',0),(9,'Canadian Dollar','C$','2',',','.','CAD',0),(10,'Philippine Peso','P ','2',',','.','PHP',0),(11,'Indian Rupee','Rs. ','2',',','.','INR',0),(12,'Australian Dollar','$','2',',','.','AUD',0),(13,'Singapore Dollar','','2',',','.','SGD',0),(14,'Norske Kroner','kr','2','.',',','NOK',1),(15,'New Zealand Dollar','$','2',',','.','NZD',0),(16,'Vietnamese Dong','','0','.',',','VND',0),(17,'Swiss Franc','','2','\'','.','CHF',0),(18,'Guatemalan Quetzal','Q','2',',','.','GTQ',0),(19,'Malaysian Ringgit','RM','2',',','.','MYR',0),(20,'Brazilian Real','R$','2','.',',','BRL',0),(21,'Thai Baht','','2',',','.','THB',0),(22,'Nigerian Naira','','2',',','.','NGN',0),(23,'Argentine Peso','$','2','.',',','ARS',0),(24,'Bangladeshi Taka','Tk','2',',','.','BDT',0),(25,'United Arab Emirates Dirham','DH ','2',',','.','AED',0),(26,'Hong Kong Dollar','','2',',','.','HKD',0),(27,'Indonesian Rupiah','Rp','2',',','.','IDR',0),(28,'Mexican Peso','$','2',',','.','MXN',0),(29,'Egyptian Pound','E£','2',',','.','EGP',0),(30,'Colombian Peso','$','2','.',',','COP',0),(31,'West African Franc','CFA ','2',',','.','XOF',0),(32,'Chinese Renminbi','RMB ','2',',','.','CNY',0),(33,'Rwandan Franc','RF ','2',',','.','RWF',0),(34,'Tanzanian Shilling','TSh ','2',',','.','TZS',0),(35,'Netherlands Antillean Guilder','','2','.',',','ANG',0),(36,'Trinidad and Tobago Dollar','TT$','2',',','.','TTD',0),(37,'East Caribbean Dollar','EC$','2',',','.','XCD',0),(38,'Ghanaian Cedi','','2',',','.','GHS',0),(39,'Bulgarian Lev','','2',' ','.','BGN',0),(40,'Aruban Florin','Afl. ','2',' ','.','AWG',0),(41,'Turkish Lira','TL ','2','.',',','TRY',0),(42,'Romanian New Leu','','2',',','.','RON',0),(43,'Croatian Kuna','kn','2','.',',','HRK',0),(44,'Saudi Riyal','','2',',','.','SAR',0),(45,'Japanese Yen','¥','0',',','.','JPY',0),(46,'Maldivian Rufiyaa','','2',',','.','MVR',0),(47,'Costa Rican Colón','','2',',','.','CRC',0),(48,'Pakistani Rupee','Rs ','0',',','.','PKR',0),(49,'Polish Zloty','zł','2',' ',',','PLN',1),(50,'Sri Lankan Rupee','LKR','2',',','.','LKR',1),(51,'Czech Koruna','Kč','2',' ',',','CZK',1),(52,'Uruguayan Peso','$','2','.',',','UYU',0),(53,'Namibian Dollar','$','2',',','.','NAD',0),(54,'Tunisian Dinar','','2',',','.','TND',0),(55,'Russian Ruble','','2',',','.','RUB',0),(56,'Mozambican Metical','MT','2','.',',','MZN',1),(57,'Omani Rial','','2',',','.','OMR',0); /*!40000 ALTER TABLE `currencies` ENABLE KEYS */; UNLOCK TABLES; @@ -1067,7 +1075,7 @@ CREATE TABLE `frequencies` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1076,7 +1084,7 @@ CREATE TABLE `frequencies` ( LOCK TABLES `frequencies` WRITE; /*!40000 ALTER TABLE `frequencies` DISABLE KEYS */; -INSERT INTO `frequencies` VALUES (1,'Weekly'),(2,'Two weeks'),(3,'Four weeks'),(4,'Monthly'),(5,'Three months'),(6,'Six months'),(7,'Annually'); +INSERT INTO `frequencies` VALUES (1,'Weekly'),(2,'Two weeks'),(3,'Four weeks'),(4,'Monthly'),(5,'Two months'),(6,'Three months'),(7,'Six months'),(8,'Annually'); /*!40000 ALTER TABLE `frequencies` ENABLE KEYS */; UNLOCK TABLES; @@ -1137,7 +1145,7 @@ CREATE TABLE `gateways` ( LOCK TABLES `gateways` WRITE; /*!40000 ALTER TABLE `gateways` DISABLE KEYS */; -INSERT INTO `gateways` VALUES (1,'2017-01-29 19:20:46','2017-01-29 19:20:46','Authorize.Net AIM','AuthorizeNet_AIM',1,1,4,0,NULL,0,0),(2,'2017-01-29 19:20:46','2017-01-29 19:20:46','Authorize.Net SIM','AuthorizeNet_SIM',1,2,10000,0,NULL,0,0),(3,'2017-01-29 19:20:46','2017-01-29 19:20:46','CardSave','CardSave',1,1,10000,0,NULL,0,0),(4,'2017-01-29 19:20:46','2017-01-29 19:20:46','Eway Rapid','Eway_RapidShared',1,1,10000,0,NULL,1,0),(5,'2017-01-29 19:20:46','2017-01-29 19:20:46','FirstData Connect','FirstData_Connect',1,1,10000,0,NULL,0,0),(6,'2017-01-29 19:20:46','2017-01-29 19:20:46','GoCardless','GoCardless',1,1,10000,0,NULL,1,0),(7,'2017-01-29 19:20:46','2017-01-29 19:20:46','Migs ThreeParty','Migs_ThreeParty',1,1,10000,0,NULL,0,0),(8,'2017-01-29 19:20:46','2017-01-29 19:20:46','Migs TwoParty','Migs_TwoParty',1,1,10000,0,NULL,0,0),(9,'2017-01-29 19:20:46','2017-01-29 19:20:46','Mollie','Mollie',1,1,7,0,NULL,1,0),(10,'2017-01-29 19:20:46','2017-01-29 19:20:46','MultiSafepay','MultiSafepay',1,1,10000,0,NULL,0,0),(11,'2017-01-29 19:20:46','2017-01-29 19:20:46','Netaxept','Netaxept',1,1,10000,0,NULL,0,0),(12,'2017-01-29 19:20:46','2017-01-29 19:20:46','NetBanx','NetBanx',1,1,10000,0,NULL,0,0),(13,'2017-01-29 19:20:46','2017-01-29 19:20:46','PayFast','PayFast',1,1,10000,0,NULL,1,0),(14,'2017-01-29 19:20:46','2017-01-29 19:20:46','Payflow Pro','Payflow_Pro',1,1,10000,0,NULL,0,0),(15,'2017-01-29 19:20:46','2017-01-29 19:20:46','PaymentExpress PxPay','PaymentExpress_PxPay',1,1,10000,0,NULL,0,0),(16,'2017-01-29 19:20:46','2017-01-29 19:20:46','PaymentExpress PxPost','PaymentExpress_PxPost',1,1,10000,0,NULL,0,0),(17,'2017-01-29 19:20:46','2017-01-29 19:20:46','PayPal Express','PayPal_Express',1,1,3,0,NULL,1,0),(18,'2017-01-29 19:20:46','2017-01-29 19:20:46','PayPal Pro','PayPal_Pro',1,1,10000,0,NULL,0,0),(19,'2017-01-29 19:20:46','2017-01-29 19:20:46','Pin','Pin',1,1,10000,0,NULL,0,0),(20,'2017-01-29 19:20:46','2017-01-29 19:20:46','SagePay Direct','SagePay_Direct',1,1,10000,0,NULL,0,0),(21,'2017-01-29 19:20:46','2017-01-29 19:20:46','SagePay Server','SagePay_Server',1,1,10000,0,NULL,0,0),(22,'2017-01-29 19:20:46','2017-01-29 19:20:46','SecurePay DirectPost','SecurePay_DirectPost',1,1,10000,0,NULL,0,0),(23,'2017-01-29 19:20:46','2017-01-29 19:20:46','Stripe','Stripe',1,1,1,0,NULL,0,0),(24,'2017-01-29 19:20:46','2017-01-29 19:20:46','TargetPay Direct eBanking','TargetPay_Directebanking',1,1,10000,0,NULL,0,0),(25,'2017-01-29 19:20:46','2017-01-29 19:20:46','TargetPay Ideal','TargetPay_Ideal',1,1,10000,0,NULL,0,0),(26,'2017-01-29 19:20:46','2017-01-29 19:20:46','TargetPay Mr Cash','TargetPay_Mrcash',1,1,10000,0,NULL,0,0),(27,'2017-01-29 19:20:46','2017-01-29 19:20:46','TwoCheckout','TwoCheckout',1,1,10000,0,NULL,1,0),(28,'2017-01-29 19:20:46','2017-01-29 19:20:46','WorldPay','WorldPay',1,1,10000,0,NULL,0,0),(29,'2017-01-29 19:20:46','2017-01-29 19:20:46','BeanStream','BeanStream',1,2,10000,0,NULL,0,0),(30,'2017-01-29 19:20:46','2017-01-29 19:20:46','Psigate','Psigate',1,2,10000,0,NULL,0,0),(31,'2017-01-29 19:20:46','2017-01-29 19:20:46','moolah','AuthorizeNet_AIM',1,1,10000,0,NULL,0,0),(32,'2017-01-29 19:20:46','2017-01-29 19:20:46','Alipay','Alipay_Express',1,1,10000,0,NULL,0,0),(33,'2017-01-29 19:20:46','2017-01-29 19:20:46','Buckaroo','Buckaroo_CreditCard',1,1,10000,0,NULL,0,0),(34,'2017-01-29 19:20:46','2017-01-29 19:20:46','Coinbase','Coinbase',1,1,10000,0,NULL,0,0),(35,'2017-01-29 19:20:46','2017-01-29 19:20:46','DataCash','DataCash',1,1,10000,0,NULL,0,0),(36,'2017-01-29 19:20:46','2017-01-29 19:20:46','Neteller','Neteller',1,2,10000,0,NULL,0,0),(37,'2017-01-29 19:20:46','2017-01-29 19:20:46','Pacnet','Pacnet',1,1,10000,0,NULL,0,0),(38,'2017-01-29 19:20:46','2017-01-29 19:20:46','PaymentSense','PaymentSense',1,2,10000,0,NULL,0,0),(39,'2017-01-29 19:20:46','2017-01-29 19:20:46','Realex','Realex_Remote',1,1,10000,0,NULL,0,0),(40,'2017-01-29 19:20:46','2017-01-29 19:20:46','Sisow','Sisow',1,1,10000,0,NULL,0,0),(41,'2017-01-29 19:20:46','2017-01-29 19:20:46','Skrill','Skrill',1,1,10000,0,NULL,1,0),(42,'2017-01-29 19:20:46','2017-01-29 19:20:46','BitPay','BitPay',1,1,6,0,NULL,1,0),(43,'2017-01-29 19:20:46','2017-01-29 19:20:46','Dwolla','Dwolla',1,1,5,0,NULL,1,0),(44,'2017-01-29 19:20:46','2017-01-29 19:20:46','AGMS','Agms',1,1,10000,0,NULL,0,0),(45,'2017-01-29 19:20:46','2017-01-29 19:20:46','Barclays','BarclaysEpdq\\Essential',1,1,10000,0,NULL,0,0),(46,'2017-01-29 19:20:46','2017-01-29 19:20:46','Cardgate','Cardgate',1,1,10000,0,NULL,0,0),(47,'2017-01-29 19:20:46','2017-01-29 19:20:46','Checkout.com','CheckoutCom',1,1,10000,0,NULL,0,0),(48,'2017-01-29 19:20:46','2017-01-29 19:20:46','Creditcall','Creditcall',1,1,10000,0,NULL,0,0),(49,'2017-01-29 19:20:46','2017-01-29 19:20:46','Cybersource','Cybersource',1,1,10000,0,NULL,0,0),(50,'2017-01-29 19:20:46','2017-01-29 19:20:46','ecoPayz','Ecopayz',1,1,10000,0,NULL,0,0),(51,'2017-01-29 19:20:46','2017-01-29 19:20:46','Fasapay','Fasapay',1,1,10000,0,NULL,0,0),(52,'2017-01-29 19:20:46','2017-01-29 19:20:46','Komoju','Komoju',1,1,10000,0,NULL,0,0),(53,'2017-01-29 19:20:46','2017-01-29 19:20:46','Multicards','Multicards',1,1,10000,0,NULL,0,0),(54,'2017-01-29 19:20:46','2017-01-29 19:20:46','Pagar.Me','Pagarme',1,2,10000,0,NULL,0,0),(55,'2017-01-29 19:20:46','2017-01-29 19:20:46','Paysafecard','Paysafecard',1,1,10000,0,NULL,0,0),(56,'2017-01-29 19:20:46','2017-01-29 19:20:46','Paytrace','Paytrace_CreditCard',1,1,10000,0,NULL,0,0),(57,'2017-01-29 19:20:46','2017-01-29 19:20:46','Secure Trading','SecureTrading',1,1,10000,0,NULL,0,0),(58,'2017-01-29 19:20:46','2017-01-29 19:20:46','SecPay','SecPay',1,1,10000,0,NULL,0,0),(59,'2017-01-29 19:20:46','2017-01-29 19:20:46','WeChat Express','WeChat_Express',1,2,10000,0,NULL,0,0),(60,'2017-01-29 19:20:46','2017-01-29 19:20:46','WePay','WePay',1,1,10000,0,NULL,0,0),(61,'2017-01-29 19:20:46','2017-01-29 19:20:46','Braintree','Braintree',1,1,2,0,NULL,0,0),(62,'2017-01-29 19:20:46','2017-01-29 19:20:46','Custom','Custom',1,1,8,0,NULL,1,0); +INSERT INTO `gateways` VALUES (1,'2017-02-27 13:59:53','2017-02-27 13:59:53','Authorize.Net AIM','AuthorizeNet_AIM',1,1,4,0,NULL,0,0),(2,'2017-02-27 13:59:53','2017-02-27 13:59:53','Authorize.Net SIM','AuthorizeNet_SIM',1,2,10000,0,NULL,0,0),(3,'2017-02-27 13:59:53','2017-02-27 13:59:53','CardSave','CardSave',1,1,10000,0,NULL,0,0),(4,'2017-02-27 13:59:53','2017-02-27 13:59:53','Eway Rapid','Eway_RapidShared',1,1,10000,0,NULL,1,0),(5,'2017-02-27 13:59:53','2017-02-27 13:59:53','FirstData Connect','FirstData_Connect',1,1,10000,0,NULL,0,0),(6,'2017-02-27 13:59:53','2017-02-27 13:59:53','GoCardless','GoCardless',1,1,10000,0,NULL,1,0),(7,'2017-02-27 13:59:53','2017-02-27 13:59:53','Migs ThreeParty','Migs_ThreeParty',1,1,10000,0,NULL,0,0),(8,'2017-02-27 13:59:53','2017-02-27 13:59:53','Migs TwoParty','Migs_TwoParty',1,1,10000,0,NULL,0,0),(9,'2017-02-27 13:59:53','2017-02-27 13:59:53','Mollie','Mollie',1,1,7,0,NULL,1,0),(10,'2017-02-27 13:59:53','2017-02-27 13:59:53','MultiSafepay','MultiSafepay',1,1,10000,0,NULL,0,0),(11,'2017-02-27 13:59:53','2017-02-27 13:59:53','Netaxept','Netaxept',1,1,10000,0,NULL,0,0),(12,'2017-02-27 13:59:53','2017-02-27 13:59:53','NetBanx','NetBanx',1,1,10000,0,NULL,0,0),(13,'2017-02-27 13:59:53','2017-02-27 13:59:53','PayFast','PayFast',1,1,10000,0,NULL,1,0),(14,'2017-02-27 13:59:53','2017-02-27 13:59:53','Payflow Pro','Payflow_Pro',1,1,10000,0,NULL,0,0),(15,'2017-02-27 13:59:53','2017-02-27 13:59:53','PaymentExpress PxPay','PaymentExpress_PxPay',1,1,10000,0,NULL,0,0),(16,'2017-02-27 13:59:53','2017-02-27 13:59:53','PaymentExpress PxPost','PaymentExpress_PxPost',1,1,10000,0,NULL,0,0),(17,'2017-02-27 13:59:53','2017-02-27 13:59:53','PayPal Express','PayPal_Express',1,1,3,0,NULL,1,0),(18,'2017-02-27 13:59:53','2017-02-27 13:59:53','PayPal Pro','PayPal_Pro',1,1,10000,0,NULL,0,0),(19,'2017-02-27 13:59:53','2017-02-27 13:59:53','Pin','Pin',1,1,10000,0,NULL,0,0),(20,'2017-02-27 13:59:53','2017-02-27 13:59:53','SagePay Direct','SagePay_Direct',1,1,10000,0,NULL,0,0),(21,'2017-02-27 13:59:53','2017-02-27 13:59:53','SagePay Server','SagePay_Server',1,1,10000,0,NULL,0,0),(22,'2017-02-27 13:59:53','2017-02-27 13:59:53','SecurePay DirectPost','SecurePay_DirectPost',1,1,10000,0,NULL,0,0),(23,'2017-02-27 13:59:53','2017-02-27 13:59:53','Stripe','Stripe',1,1,1,0,NULL,0,0),(24,'2017-02-27 13:59:53','2017-02-27 13:59:53','TargetPay Direct eBanking','TargetPay_Directebanking',1,1,10000,0,NULL,0,0),(25,'2017-02-27 13:59:53','2017-02-27 13:59:53','TargetPay Ideal','TargetPay_Ideal',1,1,10000,0,NULL,0,0),(26,'2017-02-27 13:59:53','2017-02-27 13:59:53','TargetPay Mr Cash','TargetPay_Mrcash',1,1,10000,0,NULL,0,0),(27,'2017-02-27 13:59:53','2017-02-27 13:59:53','TwoCheckout','TwoCheckout',1,1,10000,0,NULL,1,0),(28,'2017-02-27 13:59:53','2017-02-27 13:59:53','WorldPay','WorldPay',1,1,10000,0,NULL,0,0),(29,'2017-02-27 13:59:53','2017-02-27 13:59:53','BeanStream','BeanStream',1,2,10000,0,NULL,0,0),(30,'2017-02-27 13:59:53','2017-02-27 13:59:53','Psigate','Psigate',1,2,10000,0,NULL,0,0),(31,'2017-02-27 13:59:53','2017-02-27 13:59:53','moolah','AuthorizeNet_AIM',1,1,10000,0,NULL,0,0),(32,'2017-02-27 13:59:53','2017-02-27 13:59:53','Alipay','Alipay_Express',1,1,10000,0,NULL,0,0),(33,'2017-02-27 13:59:53','2017-02-27 13:59:53','Buckaroo','Buckaroo_CreditCard',1,1,10000,0,NULL,0,0),(34,'2017-02-27 13:59:53','2017-02-27 13:59:53','Coinbase','Coinbase',1,1,10000,0,NULL,0,0),(35,'2017-02-27 13:59:53','2017-02-27 13:59:53','DataCash','DataCash',1,1,10000,0,NULL,0,0),(36,'2017-02-27 13:59:53','2017-02-27 13:59:53','Neteller','Neteller',1,2,10000,0,NULL,0,0),(37,'2017-02-27 13:59:53','2017-02-27 13:59:53','Pacnet','Pacnet',1,1,10000,0,NULL,0,0),(38,'2017-02-27 13:59:53','2017-02-27 13:59:53','PaymentSense','PaymentSense',1,2,10000,0,NULL,0,0),(39,'2017-02-27 13:59:53','2017-02-27 13:59:53','Realex','Realex_Remote',1,1,10000,0,NULL,0,0),(40,'2017-02-27 13:59:53','2017-02-27 13:59:53','Sisow','Sisow',1,1,10000,0,NULL,0,0),(41,'2017-02-27 13:59:53','2017-02-27 13:59:53','Skrill','Skrill',1,1,10000,0,NULL,1,0),(42,'2017-02-27 13:59:53','2017-02-27 13:59:53','BitPay','BitPay',1,1,6,0,NULL,1,0),(43,'2017-02-27 13:59:53','2017-02-27 13:59:53','Dwolla','Dwolla',1,1,5,0,NULL,1,0),(44,'2017-02-27 13:59:53','2017-02-27 13:59:53','AGMS','Agms',1,1,10000,0,NULL,0,0),(45,'2017-02-27 13:59:53','2017-02-27 13:59:53','Barclays','BarclaysEpdq\\Essential',1,1,10000,0,NULL,0,0),(46,'2017-02-27 13:59:53','2017-02-27 13:59:53','Cardgate','Cardgate',1,1,10000,0,NULL,0,0),(47,'2017-02-27 13:59:53','2017-02-27 13:59:53','Checkout.com','CheckoutCom',1,1,10000,0,NULL,0,0),(48,'2017-02-27 13:59:53','2017-02-27 13:59:53','Creditcall','Creditcall',1,1,10000,0,NULL,0,0),(49,'2017-02-27 13:59:53','2017-02-27 13:59:53','Cybersource','Cybersource',1,1,10000,0,NULL,0,0),(50,'2017-02-27 13:59:53','2017-02-27 13:59:53','ecoPayz','Ecopayz',1,1,10000,0,NULL,0,0),(51,'2017-02-27 13:59:53','2017-02-27 13:59:53','Fasapay','Fasapay',1,1,10000,0,NULL,0,0),(52,'2017-02-27 13:59:53','2017-02-27 13:59:53','Komoju','Komoju',1,1,10000,0,NULL,0,0),(53,'2017-02-27 13:59:53','2017-02-27 13:59:53','Multicards','Multicards',1,1,10000,0,NULL,0,0),(54,'2017-02-27 13:59:53','2017-02-27 13:59:53','Pagar.Me','Pagarme',1,2,10000,0,NULL,0,0),(55,'2017-02-27 13:59:53','2017-02-27 13:59:53','Paysafecard','Paysafecard',1,1,10000,0,NULL,0,0),(56,'2017-02-27 13:59:53','2017-02-27 13:59:53','Paytrace','Paytrace_CreditCard',1,1,10000,0,NULL,0,0),(57,'2017-02-27 13:59:53','2017-02-27 13:59:53','Secure Trading','SecureTrading',1,1,10000,0,NULL,0,0),(58,'2017-02-27 13:59:53','2017-02-27 13:59:53','SecPay','SecPay',1,1,10000,0,NULL,0,0),(59,'2017-02-27 13:59:53','2017-02-27 13:59:53','WeChat Express','WeChat_Express',1,2,10000,0,NULL,0,0),(60,'2017-02-27 13:59:53','2017-02-27 13:59:53','WePay','WePay',1,1,10000,0,NULL,0,0),(61,'2017-02-27 13:59:53','2017-02-27 13:59:53','Braintree','Braintree',1,1,2,0,NULL,0,0),(62,'2017-02-27 13:59:53','2017-02-27 13:59:53','Custom','Custom',1,1,8,0,NULL,1,0); /*!40000 ALTER TABLE `gateways` ENABLE KEYS */; UNLOCK TABLES; @@ -1266,6 +1274,7 @@ CREATE TABLE `invoice_items` ( `custom_value2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tax_name2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tax_rate2` decimal(13,3) NOT NULL, + `invoice_item_type_id` smallint(6) NOT NULL DEFAULT '1', PRIMARY KEY (`id`), UNIQUE KEY `invoice_items_account_id_public_id_unique` (`account_id`,`public_id`), KEY `invoice_items_product_id_foreign` (`product_id`), @@ -1503,7 +1512,7 @@ CREATE TABLE `migrations` ( LOCK TABLES `migrations` WRITE; /*!40000 ALTER TABLE `migrations` DISABLE KEYS */; -INSERT INTO `migrations` VALUES ('2013_11_05_180133_confide_setup_users_table',1),('2013_11_28_195703_setup_countries_table',1),('2014_02_13_151500_add_cascase_drops',1),('2014_02_19_151817_add_support_for_invoice_designs',1),('2014_03_03_155556_add_phone_to_account',1),('2014_03_19_201454_add_language_support',1),('2014_03_20_200300_create_payment_libraries',1),('2014_03_23_051736_enable_forcing_jspdf',1),('2014_03_25_102200_add_sort_and_recommended_to_gateways',1),('2014_04_03_191105_add_pro_plan',1),('2014_04_17_100523_add_remember_token',1),('2014_04_17_145108_add_custom_fields',1),('2014_04_23_170909_add_products_settings',1),('2014_04_29_174315_add_advanced_settings',1),('2014_05_17_175626_add_quotes',1),('2014_06_17_131940_add_accepted_credit_cards_to_account_gateways',1),('2014_07_13_142654_one_click_install',1),('2014_07_17_205900_support_hiding_quantity',1),('2014_07_24_171214_add_zapier_support',1),('2014_10_01_141248_add_company_vat_number',1),('2014_10_05_141856_track_last_seen_message',1),('2014_10_06_103529_add_timesheets',1),('2014_10_06_195330_add_invoice_design_table',1),('2014_10_13_054100_add_invoice_number_settings',1),('2014_10_14_225227_add_danish_translation',1),('2014_10_22_174452_add_affiliate_price',1),('2014_10_30_184126_add_company_id_number',1),('2014_11_04_200406_allow_null_client_currency',1),('2014_12_03_154119_add_discount_type',1),('2015_02_12_102940_add_email_templates',1),('2015_02_17_131714_support_token_billing',1),('2015_02_27_081836_add_invoice_footer',1),('2015_03_03_140259_add_tokens',1),('2015_03_09_151011_add_ip_to_activity',1),('2015_03_15_174122_add_pdf_email_attachment_option',1),('2015_03_30_100000_create_password_resets_table',1),('2015_04_12_093447_add_sv_language',1),('2015_04_13_100333_add_notify_approved',1),('2015_04_16_122647_add_partial_amount_to_invoices',1),('2015_05_21_184104_add_font_size',1),('2015_05_27_121828_add_tasks',1),('2015_05_27_170808_add_custom_invoice_labels',1),('2015_06_09_134208_add_has_tasks_to_invoices',1),('2015_06_14_093410_enable_resuming_tasks',1),('2015_06_14_173025_multi_company_support',1),('2015_07_07_160257_support_locking_account',1),('2015_07_08_114333_simplify_tasks',1),('2015_07_19_081332_add_custom_design',1),('2015_07_27_183830_add_pdfmake_support',1),('2015_08_13_084041_add_formats_to_datetime_formats_table',1),('2015_09_04_080604_add_swap_postal_code',1),('2015_09_07_135935_add_account_domain',1),('2015_09_10_185135_add_reminder_emails',1),('2015_10_07_135651_add_social_login',1),('2015_10_21_075058_add_default_tax_rates',1),('2015_10_21_185724_add_invoice_number_pattern',1),('2015_10_27_180214_add_is_system_to_activities',1),('2015_10_29_133747_add_default_quote_terms',1),('2015_11_01_080417_encrypt_tokens',1),('2015_11_03_181318_improve_currency_localization',1),('2015_11_30_133206_add_email_designs',1),('2015_12_27_154513_add_reminder_settings',1),('2015_12_30_042035_add_client_view_css',1),('2016_01_04_175228_create_vendors_table',1),('2016_01_06_153144_add_invoice_font_support',1),('2016_01_17_155725_add_quote_to_invoice_option',1),('2016_01_18_195351_add_bank_accounts',1),('2016_01_24_112646_add_bank_subaccounts',1),('2016_01_27_173015_add_header_footer_option',1),('2016_02_01_135956_add_source_currency_to_expenses',1),('2016_02_25_152948_add_client_password',1),('2016_02_28_081424_add_custom_invoice_fields',1),('2016_03_14_066181_add_user_permissions',1),('2016_03_14_214710_add_support_three_decimal_taxes',1),('2016_03_22_168362_add_documents',1),('2016_03_23_215049_support_multiple_tax_rates',1),('2016_04_16_103943_enterprise_plan',1),('2016_04_18_174135_add_page_size',1),('2016_04_23_182223_payments_changes',1),('2016_05_16_102925_add_swap_currency_symbol_to_currency',1),('2016_05_18_085739_add_invoice_type_support',1),('2016_05_24_164847_wepay_ach',1),('2016_07_08_083802_support_new_pricing',1),('2016_07_13_083821_add_buy_now_buttons',1),('2016_08_10_184027_add_support_for_bots',1),('2016_09_05_150625_create_gateway_types',1),('2016_10_20_191150_add_expense_to_activities',1),('2016_11_03_113316_add_invoice_signature',1),('2016_11_03_161149_add_bluevine_fields',1),('2016_11_28_092904_add_task_projects',1),('2016_12_13_113955_add_pro_plan_discount',1),('2017_01_01_214241_add_inclusive_taxes',1); +INSERT INTO `migrations` VALUES ('2013_11_05_180133_confide_setup_users_table',1),('2013_11_28_195703_setup_countries_table',1),('2014_02_13_151500_add_cascase_drops',1),('2014_02_19_151817_add_support_for_invoice_designs',1),('2014_03_03_155556_add_phone_to_account',1),('2014_03_19_201454_add_language_support',1),('2014_03_20_200300_create_payment_libraries',1),('2014_03_23_051736_enable_forcing_jspdf',1),('2014_03_25_102200_add_sort_and_recommended_to_gateways',1),('2014_04_03_191105_add_pro_plan',1),('2014_04_17_100523_add_remember_token',1),('2014_04_17_145108_add_custom_fields',1),('2014_04_23_170909_add_products_settings',1),('2014_04_29_174315_add_advanced_settings',1),('2014_05_17_175626_add_quotes',1),('2014_06_17_131940_add_accepted_credit_cards_to_account_gateways',1),('2014_07_13_142654_one_click_install',1),('2014_07_17_205900_support_hiding_quantity',1),('2014_07_24_171214_add_zapier_support',1),('2014_10_01_141248_add_company_vat_number',1),('2014_10_05_141856_track_last_seen_message',1),('2014_10_06_103529_add_timesheets',1),('2014_10_06_195330_add_invoice_design_table',1),('2014_10_13_054100_add_invoice_number_settings',1),('2014_10_14_225227_add_danish_translation',1),('2014_10_22_174452_add_affiliate_price',1),('2014_10_30_184126_add_company_id_number',1),('2014_11_04_200406_allow_null_client_currency',1),('2014_12_03_154119_add_discount_type',1),('2015_02_12_102940_add_email_templates',1),('2015_02_17_131714_support_token_billing',1),('2015_02_27_081836_add_invoice_footer',1),('2015_03_03_140259_add_tokens',1),('2015_03_09_151011_add_ip_to_activity',1),('2015_03_15_174122_add_pdf_email_attachment_option',1),('2015_03_30_100000_create_password_resets_table',1),('2015_04_12_093447_add_sv_language',1),('2015_04_13_100333_add_notify_approved',1),('2015_04_16_122647_add_partial_amount_to_invoices',1),('2015_05_21_184104_add_font_size',1),('2015_05_27_121828_add_tasks',1),('2015_05_27_170808_add_custom_invoice_labels',1),('2015_06_09_134208_add_has_tasks_to_invoices',1),('2015_06_14_093410_enable_resuming_tasks',1),('2015_06_14_173025_multi_company_support',1),('2015_07_07_160257_support_locking_account',1),('2015_07_08_114333_simplify_tasks',1),('2015_07_19_081332_add_custom_design',1),('2015_07_27_183830_add_pdfmake_support',1),('2015_08_13_084041_add_formats_to_datetime_formats_table',1),('2015_09_04_080604_add_swap_postal_code',1),('2015_09_07_135935_add_account_domain',1),('2015_09_10_185135_add_reminder_emails',1),('2015_10_07_135651_add_social_login',1),('2015_10_21_075058_add_default_tax_rates',1),('2015_10_21_185724_add_invoice_number_pattern',1),('2015_10_27_180214_add_is_system_to_activities',1),('2015_10_29_133747_add_default_quote_terms',1),('2015_11_01_080417_encrypt_tokens',1),('2015_11_03_181318_improve_currency_localization',1),('2015_11_30_133206_add_email_designs',1),('2015_12_27_154513_add_reminder_settings',1),('2015_12_30_042035_add_client_view_css',1),('2016_01_04_175228_create_vendors_table',1),('2016_01_06_153144_add_invoice_font_support',1),('2016_01_17_155725_add_quote_to_invoice_option',1),('2016_01_18_195351_add_bank_accounts',1),('2016_01_24_112646_add_bank_subaccounts',1),('2016_01_27_173015_add_header_footer_option',1),('2016_02_01_135956_add_source_currency_to_expenses',1),('2016_02_25_152948_add_client_password',1),('2016_02_28_081424_add_custom_invoice_fields',1),('2016_03_14_066181_add_user_permissions',1),('2016_03_14_214710_add_support_three_decimal_taxes',1),('2016_03_22_168362_add_documents',1),('2016_03_23_215049_support_multiple_tax_rates',1),('2016_04_16_103943_enterprise_plan',1),('2016_04_18_174135_add_page_size',1),('2016_04_23_182223_payments_changes',1),('2016_05_16_102925_add_swap_currency_symbol_to_currency',1),('2016_05_18_085739_add_invoice_type_support',1),('2016_05_24_164847_wepay_ach',1),('2016_07_08_083802_support_new_pricing',1),('2016_07_13_083821_add_buy_now_buttons',1),('2016_08_10_184027_add_support_for_bots',1),('2016_09_05_150625_create_gateway_types',1),('2016_10_20_191150_add_expense_to_activities',1),('2016_11_03_113316_add_invoice_signature',1),('2016_11_03_161149_add_bluevine_fields',1),('2016_11_28_092904_add_task_projects',1),('2016_12_13_113955_add_pro_plan_discount',1),('2017_01_01_214241_add_inclusive_taxes',1),('2017_02_23_095934_add_custom_product_fields',1); /*!40000 ALTER TABLE `migrations` ENABLE KEYS */; UNLOCK TABLES; @@ -1554,7 +1563,7 @@ CREATE TABLE `payment_libraries` ( LOCK TABLES `payment_libraries` WRITE; /*!40000 ALTER TABLE `payment_libraries` DISABLE KEYS */; -INSERT INTO `payment_libraries` VALUES (1,'2017-01-29 19:20:45','2017-01-29 19:20:45','Omnipay',1),(2,'2017-01-29 19:20:45','2017-01-29 19:20:45','PHP-Payments [Deprecated]',1); +INSERT INTO `payment_libraries` VALUES (1,'2017-02-27 13:59:51','2017-02-27 13:59:51','Omnipay',1),(2,'2017-02-27 13:59:51','2017-02-27 13:59:51','PHP-Payments [Deprecated]',1); /*!40000 ALTER TABLE `payment_libraries` ENABLE KEYS */; UNLOCK TABLES; @@ -1570,7 +1579,7 @@ CREATE TABLE `payment_methods` ( `account_id` int(10) unsigned NOT NULL, `user_id` int(10) unsigned NOT NULL, `contact_id` int(10) unsigned DEFAULT NULL, - `account_gateway_token_id` int(10) unsigned DEFAULT NULL, + `account_gateway_token_id` int(10) unsigned NOT NULL, `payment_type_id` int(10) unsigned NOT NULL, `source_reference` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `routing_number` int(10) unsigned DEFAULT NULL, @@ -1590,10 +1599,10 @@ CREATE TABLE `payment_methods` ( KEY `payment_methods_public_id_index` (`public_id`), KEY `payment_methods_user_id_foreign` (`user_id`), KEY `payment_methods_contact_id_foreign` (`contact_id`), + KEY `payment_methods_account_gateway_token_id_foreign` (`account_gateway_token_id`), KEY `payment_methods_payment_type_id_foreign` (`payment_type_id`), KEY `payment_methods_currency_id_foreign` (`currency_id`), - KEY `payment_methods_account_gateway_token_id_foreign` (`account_gateway_token_id`), - CONSTRAINT `payment_methods_account_gateway_token_id_foreign` FOREIGN KEY (`account_gateway_token_id`) REFERENCES `account_gateway_tokens` (`id`) ON DELETE CASCADE, + CONSTRAINT `payment_methods_account_gateway_token_id_foreign` FOREIGN KEY (`account_gateway_token_id`) REFERENCES `account_gateway_tokens` (`id`), CONSTRAINT `payment_methods_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE, CONSTRAINT `payment_methods_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE, CONSTRAINT `payment_methods_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`), @@ -1664,7 +1673,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-01-29 19:20:45','2017-01-29 19:20:45',NULL,0,0,1),(2,10,'Net 10','2017-01-29 19:20:45','2017-01-29 19:20:45',NULL,0,0,2),(3,14,'Net 14','2017-01-29 19:20:45','2017-01-29 19:20:45',NULL,0,0,3),(4,15,'Net 15','2017-01-29 19:20:45','2017-01-29 19:20:45',NULL,0,0,4),(5,30,'Net 30','2017-01-29 19:20:45','2017-01-29 19:20:45',NULL,0,0,5),(6,60,'Net 60','2017-01-29 19:20:45','2017-01-29 19:20:45',NULL,0,0,6),(7,90,'Net 90','2017-01-29 19:20:45','2017-01-29 19:20:45',NULL,0,0,7),(8,-1,'Net 0','2017-01-29 19:20:48','2017-01-29 19:20:48',NULL,0,0,0); +INSERT INTO `payment_terms` VALUES (1,7,'Net 7','2017-02-27 13:59:51','2017-02-27 13:59:51',NULL,0,0,1),(2,10,'Net 10','2017-02-27 13:59:51','2017-02-27 13:59:51',NULL,0,0,2),(3,14,'Net 14','2017-02-27 13:59:51','2017-02-27 13:59:51',NULL,0,0,3),(4,15,'Net 15','2017-02-27 13:59:51','2017-02-27 13:59:51',NULL,0,0,4),(5,30,'Net 30','2017-02-27 13:59:51','2017-02-27 13:59:51',NULL,0,0,5),(6,60,'Net 60','2017-02-27 13:59:51','2017-02-27 13:59:51',NULL,0,0,6),(7,90,'Net 90','2017-02-27 13:59:51','2017-02-27 13:59:51',NULL,0,0,7),(8,-1,'Net 0','2017-02-27 13:59:55','2017-02-27 13:59:55',NULL,0,0,0); /*!40000 ALTER TABLE `payment_terms` ENABLE KEYS */; UNLOCK TABLES; @@ -1749,7 +1758,7 @@ CREATE TABLE `payments` ( CONSTRAINT `payments_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE, CONSTRAINT `payments_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE, CONSTRAINT `payments_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE, - CONSTRAINT `payments_payment_method_id_foreign` FOREIGN KEY (`payment_method_id`) REFERENCES `payment_methods` (`id`) ON DELETE CASCADE, + CONSTRAINT `payments_payment_method_id_foreign` FOREIGN KEY (`payment_method_id`) REFERENCES `payment_methods` (`id`), CONSTRAINT `payments_payment_status_id_foreign` FOREIGN KEY (`payment_status_id`) REFERENCES `payment_statuses` (`id`), CONSTRAINT `payments_payment_type_id_foreign` FOREIGN KEY (`payment_type_id`) REFERENCES `payment_types` (`id`), CONSTRAINT `payments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE @@ -1786,6 +1795,8 @@ CREATE TABLE `products` ( `public_id` int(10) unsigned NOT NULL, `default_tax_rate_id` int(10) unsigned DEFAULT NULL, `is_deleted` tinyint(1) NOT NULL DEFAULT '0', + `custom_value1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `custom_value2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `products_account_id_public_id_unique` (`account_id`,`public_id`), KEY `products_user_id_foreign` (`user_id`), @@ -2257,4 +2268,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2017-01-29 23:20:48 +-- Dump completed on 2017-02-27 17:59:55