Commit 5e612f2b by Brittney Exline

ENT-992 Adjustments to enterprise query

parent 64791fb5
...@@ -107,7 +107,7 @@ class ImportUserSocialAuthTask(ImportMysqlToHiveTableTask): ...@@ -107,7 +107,7 @@ class ImportUserSocialAuthTask(ImportMysqlToHiveTableTask):
] ]
class ImportVoucher(ImportMysqlToHiveTableTask): class ImportVoucherTask(ImportMysqlToHiveTableTask):
""" """
Ecommerce: Imports the voucher_voucher table from the ecommerce Ecommerce: Imports the voucher_voucher table from the ecommerce
database to a destination directory and a HIVE metastore. database to a destination directory and a HIVE metastore.
...@@ -134,7 +134,7 @@ class ImportVoucher(ImportMysqlToHiveTableTask): ...@@ -134,7 +134,7 @@ class ImportVoucher(ImportMysqlToHiveTableTask):
] ]
class ImportStockRecord(ImportMysqlToHiveTableTask): class ImportStockRecordTask(ImportMysqlToHiveTableTask):
""" """
Ecommerce: Imports the partner_stockrecord table from the ecommerce Ecommerce: Imports the partner_stockrecord table from the ecommerce
database to a destination directory and a HIVE metastore. database to a destination directory and a HIVE metastore.
...@@ -162,3 +162,63 @@ class ImportStockRecord(ImportMysqlToHiveTableTask): ...@@ -162,3 +162,63 @@ class ImportStockRecord(ImportMysqlToHiveTableTask):
('partner_id', 'INT'), ('partner_id', 'INT'),
('product_id', 'INT'), ('product_id', 'INT'),
] ]
class ImportConditionalOfferTask(ImportMysqlToHiveTableTask):
"""
Ecommerce: Imports conditional offer information from an ecommerce table to a
destination directory and a HIVE metastore.
"""
@property
def table_name(self):
return 'offer_conditionaloffer'
@property
def columns(self):
return [
('id', 'INT'),
('name', 'STRING'),
('slug', 'STRING'),
('description', 'STRING'),
('offer_type', 'STRING'),
('status', 'STRING'),
('priority', 'INT'),
('start_datetime', 'TIMESTAMP'),
('end_datetime', 'TIMESTAMP'),
('max_global_applications', 'INT'),
('max_user_applications', 'INT'),
('max_basket_applications', 'INT'),
('max_discount', 'DECIMAL(12, 2)'),
('total_discount', 'DECIMAL(12, 2)'),
('num_applications', 'INT'),
('num_orders', 'INT'),
('redirect_url', 'STRING'),
('date_created', 'TIMESTAMP'),
('benefit_id', 'INT'),
('condition_id', 'INT'),
('email_domains', 'TIMESTAMP'),
('site_id', 'INT'),
]
class ImportBenefitTask(ImportMysqlToHiveTableTask):
"""
Ecommerce: Imports offer benefit information from an ecommerce table to a
destination directory and a HIVE metastore.
"""
@property
def table_name(self):
return 'offer_benefit'
@property
def columns(self):
return [
('id', 'INT'),
('type', 'STRING'),
('value', 'DECIMAL(12, 2)'),
('max_affected_items', 'INT'),
('proxy_class', 'STRING'),
('range_id', 'INT'),
]
...@@ -7,12 +7,14 @@ import luigi.task ...@@ -7,12 +7,14 @@ import luigi.task
from edx.analytics.tasks.common.mysql_load import MysqlInsertTask from edx.analytics.tasks.common.mysql_load import MysqlInsertTask
from edx.analytics.tasks.enterprise.enterprise_database_imports import ( from edx.analytics.tasks.enterprise.enterprise_database_imports import (
ImportDataSharingConsentTask, ImportEnterpriseCourseEnrollmentUserTask, ImportEnterpriseCustomerTask, ImportBenefitTask, ImportConditionalOfferTask, ImportDataSharingConsentTask,
ImportEnterpriseCustomerUserTask, ImportStockRecord, ImportUserSocialAuthTask, ImportVoucher ImportEnterpriseCourseEnrollmentUserTask, ImportEnterpriseCustomerTask, ImportEnterpriseCustomerUserTask,
ImportStockRecordTask, ImportUserSocialAuthTask, ImportVoucherTask
) )
from edx.analytics.tasks.insights.database_imports import ( from edx.analytics.tasks.insights.database_imports import (
ImportAuthUserProfileTask, ImportAuthUserTask, ImportCurrentOrderDiscountState, ImportCurrentOrderLineState, ImportAuthUserProfileTask, ImportAuthUserTask, ImportCurrentOrderDiscountState, ImportCurrentOrderLineState,
ImportCurrentOrderState, ImportPersistentCourseGradeTask, ImportProductCatalog, ImportStudentCourseEnrollmentTask ImportCurrentOrderState, ImportEcommerceUser, ImportPersistentCourseGradeTask, ImportProductCatalog,
ImportStudentCourseEnrollmentTask
) )
from edx.analytics.tasks.insights.enrollments import OverwriteHiveAndMysqlDownstreamMixin from edx.analytics.tasks.insights.enrollments import OverwriteHiveAndMysqlDownstreamMixin
from edx.analytics.tasks.insights.user_activity import UserActivityTableTask from edx.analytics.tasks.insights.user_activity import UserActivityTableTask
...@@ -58,7 +60,8 @@ class EnterpriseEnrollmentRecord(Record): ...@@ -58,7 +60,8 @@ class EnterpriseEnrollmentRecord(Record):
last_activity_date = DateField(description='') last_activity_date = DateField(description='')
coupon_name = StringField(length=255, description='') coupon_name = StringField(length=255, description='')
coupon_code = StringField(length=255, description='') coupon_code = StringField(length=255, description='')
final_grade = FloatField(description='') offer = StringField(length=255, description='')
current_grade = FloatField(description='')
course_price = FloatField(description='') course_price = FloatField(description='')
discount_price = FloatField(description='') discount_price = FloatField(description='')
...@@ -151,11 +154,12 @@ class EnterpriseEnrollmentDataTask( ...@@ -151,11 +154,12 @@ class EnterpriseEnrollmentDataTask(
course.catalog_course AS course_key, course.catalog_course AS course_key,
user_profile.country AS user_country_code, user_profile.country AS user_country_code,
user_activity.latest_date AS last_activity_date, user_activity.latest_date AS last_activity_date,
ecommerce_voucher.name AS coupon_name, ecommerce_data.coupon_name AS coupon_name,
ecommerce_voucher.code AS coupon_code, ecommerce_data.coupon_code AS coupon_code,
grades.percent_grade AS final_grade, ecommerce_data.offer AS offer,
ecommerce_stockrecord.price_excl_tax AS course_price, grades.percent_grade AS current_grade,
ecommerce_order.total_incl_tax AS discount_price ecommerce_data.course_price AS course_price,
ecommerce_data.discount_price AS discount_price
FROM enterprise_enterprisecourseenrollment enterprise_course_enrollment FROM enterprise_enterprisecourseenrollment enterprise_course_enrollment
JOIN enterprise_enterprisecustomeruser enterprise_user JOIN enterprise_enterprisecustomeruser enterprise_user
ON enterprise_course_enrollment.enterprise_customer_user_id = enterprise_user.id ON enterprise_course_enrollment.enterprise_customer_user_id = enterprise_user.id
...@@ -202,18 +206,69 @@ class EnterpriseEnrollmentDataTask( ...@@ -202,18 +206,69 @@ class EnterpriseEnrollmentDataTask(
ON enterprise_user.user_id = social_auth.user_id ON enterprise_user.user_id = social_auth.user_id
JOIN course_catalog course JOIN course_catalog course
ON enterprise_course_enrollment.course_id = course.course_id ON enterprise_course_enrollment.course_id = course.course_id
JOIN catalogue_product ecommerce_catalogue_product
ON enterprise_course_enrollment.course_id = ecommerce_catalogue_product.course_id -- The subquery below joins across the tables in ecommerce to get the orders that were created.
LEFT JOIN order_line ecommerce_order_line -- It also pulls in any coupons or offers that were used to provide a discount to the user.
ON ecommerce_catalogue_product.id = ecommerce_order_line.product_id -- Finally, it filters out audit orders in the case that a user enrolls and later upgrades to a paid track,
JOIN partner_stockrecord ecommerce_stockrecord -- by choosing the order with the product that has the maximum price for the same course_id.
ON ecommerce_order_line.stockrecord_id = ecommerce_stockrecord.id LEFT JOIN (
LEFT JOIN order_order ecommerce_order SELECT
ON ecommerce_order_line.order_id = ecommerce_order.id ecommerce_user.username AS username,
LEFT JOIN order_orderdiscount ecommerce_order_discount ecommerce_catalogue_product.course_id AS course_id,
ON ecommerce_order_line.order_id = ecommerce_order_discount.order_id ecommerce_stockrecord.price_excl_tax AS course_price,
LEFT JOIN voucher_voucher ecommerce_voucher ecommerce_order.total_incl_tax AS discount_price,
ON ecommerce_order_discount.voucher_id = ecommerce_voucher.id CASE
WHEN ecommerce_offer.id IS NULL THEN NULL
WHEN ecommerce_offer.offer_type = 'Voucher' THEN NULL
ELSE CASE
WHEN ecommerce_benefit.proxy_class IS NULL THEN CONCAT(
ecommerce_benefit.type, ', ', ecommerce_benefit.value, ' (#', ecommerce_offer.id, ')'
)
WHEN ecommerce_benefit.proxy_class LIKE '%Percentage%' THEN CONCAT(
'Percentage, ', ecommerce_benefit.value, ' (#', ecommerce_offer.id, ')'
)
ELSE CONCAT('Absolute, ', ecommerce_benefit.value, ' (#', ecommerce_offer.id, ')')
END
END AS offer,
ecommerce_voucher.name AS coupon_name,
ecommerce_voucher.code AS coupon_code
FROM order_order ecommerce_order
JOIN ecommerce_user ecommerce_user
ON ecommerce_user.id = ecommerce_order.user_id
JOIN order_line ecommerce_order_line
ON ecommerce_order_line.order_id = ecommerce_order.id
JOIN catalogue_product ecommerce_catalogue_product
ON ecommerce_catalogue_product.id = ecommerce_order_line.product_id
JOIN partner_stockrecord ecommerce_stockrecord
ON ecommerce_order_line.stockrecord_id = ecommerce_stockrecord.id
INNER JOIN (
SELECT
ecomm_order.user_id AS user_id,
ecomm_product.course_id AS course_id,
MAX(ecomm_stockrecord.price_excl_tax) AS course_price
FROM order_order ecomm_order
JOIN order_line ecomm_order_line
ON ecomm_order.id = ecomm_order_line.order_id
JOIN catalogue_product ecomm_product
ON ecomm_order_line.product_id = ecomm_product.id
JOIN partner_stockrecord ecomm_stockrecord
ON ecomm_order_line.stockrecord_id = ecomm_stockrecord.id
GROUP BY ecomm_order.user_id, ecomm_product.course_id
) ecomm_order_product
ON ecommerce_user.id = ecomm_order_product.user_id
AND ecommerce_catalogue_product.course_id = ecomm_order_product.course_id
AND ecommerce_stockrecord.price_excl_tax = ecomm_order_product.course_price
LEFT JOIN order_orderdiscount ecommerce_order_discount
ON ecommerce_order_line.order_id = ecommerce_order_discount.order_id
LEFT JOIN voucher_voucher ecommerce_voucher
ON ecommerce_order_discount.voucher_id = ecommerce_voucher.id
LEFT JOIN offer_conditionaloffer ecommerce_offer
ON ecommerce_order_discount.offer_id = ecommerce_offer.id
LEFT JOIN offer_benefit ecommerce_benefit
ON ecommerce_offer.benefit_id = ecommerce_benefit.id
) ecommerce_data
ON auth_user.username = ecommerce_data.username
AND enterprise_course_enrollment.course_id = ecommerce_data.course_id
""" """
@property @property
...@@ -261,9 +316,12 @@ class EnterpriseEnrollmentDataTask( ...@@ -261,9 +316,12 @@ class EnterpriseEnrollmentDataTask(
ImportProductCatalog(**kwargs), ImportProductCatalog(**kwargs),
ImportCurrentOrderLineState(**kwargs), ImportCurrentOrderLineState(**kwargs),
ImportCurrentOrderDiscountState(**kwargs), ImportCurrentOrderDiscountState(**kwargs),
ImportVoucher(**kwargs), ImportVoucherTask(**kwargs),
ImportStockRecord(**kwargs), ImportStockRecordTask(**kwargs),
ImportCurrentOrderState(**kwargs), ImportCurrentOrderState(**kwargs),
ImportEcommerceUser(**kwargs),
ImportConditionalOfferTask(**kwargs),
ImportBenefitTask(**kwargs),
) )
......
...@@ -7,8 +7,9 @@ import textwrap ...@@ -7,8 +7,9 @@ import textwrap
from unittest import TestCase from unittest import TestCase
from edx.analytics.tasks.enterprise.enterprise_database_imports import ( from edx.analytics.tasks.enterprise.enterprise_database_imports import (
ImportDataSharingConsentTask, ImportEnterpriseCourseEnrollmentUserTask, ImportEnterpriseCustomerTask, ImportBenefitTask, ImportConditionalOfferTask, ImportDataSharingConsentTask,
ImportEnterpriseCustomerUserTask, ImportUserSocialAuthTask ImportEnterpriseCourseEnrollmentUserTask, ImportEnterpriseCustomerTask, ImportEnterpriseCustomerUserTask,
ImportStockRecordTask, ImportUserSocialAuthTask, ImportVoucherTask
) )
from edx.analytics.tasks.util.tests.config import with_luigi_config from edx.analytics.tasks.util.tests.config import with_luigi_config
...@@ -126,3 +127,95 @@ class ImportUserSocialAuthTaskTestCase(TestCase): ...@@ -126,3 +127,95 @@ class ImportUserSocialAuthTaskTestCase(TestCase):
""".format(dt=dt) """.format(dt=dt)
) )
self.assertEquals(query, expected_query) self.assertEquals(query, expected_query)
class ImportVoucherTaskTestCase(TestCase):
@with_luigi_config('database-import', 'destination', 's3://foo/bar')
def test_query_with_date(self):
dt = '2014-07-01'
kwargs = {'import_date': datetime.datetime.strptime(dt, '%Y-%m-%d').date()}
task = ImportVoucherTask(**kwargs)
query = task.query()
expected_query = textwrap.dedent(
"""
USE default;
DROP TABLE IF EXISTS `voucher_voucher`;
CREATE EXTERNAL TABLE `voucher_voucher` (
`id` INT,`name` STRING,`code` STRING,`usage` STRING,`start_datetime` TIMESTAMP,`end_datetime` TIMESTAMP,`num_basket_additions` INT,`num_orders` INT,`total_discount` DECIMAL(12, 2),`date_created` TIMESTAMP
)
PARTITIONED BY (dt STRING)
LOCATION 's3://foo/bar/voucher_voucher';
ALTER TABLE `voucher_voucher` ADD PARTITION (dt = '{dt}');
""".format(dt=dt)
)
self.assertEquals(query, expected_query)
class ImportStockRecordTaskTestCase(TestCase):
@with_luigi_config('database-import', 'destination', 's3://foo/bar')
def test_query_with_date(self):
dt = '2014-07-01'
kwargs = {'import_date': datetime.datetime.strptime(dt, '%Y-%m-%d').date()}
task = ImportStockRecordTask(**kwargs)
query = task.query()
expected_query = textwrap.dedent(
"""
USE default;
DROP TABLE IF EXISTS `partner_stockrecord`;
CREATE EXTERNAL TABLE `partner_stockrecord` (
`id` INT,`partner_sku` STRING,`price_currency` STRING,`price_excl_tax` DECIMAL(12, 2),`price_retail` DECIMAL(12, 2),`cost_price` DECIMAL(12, 2),`num_in_stock` INT,`num_allocated` INT,`low_stock_threshold` INT,`date_created` TIMESTAMP,`date_updated` TIMESTAMP,`partner_id` INT,`product_id` INT
)
PARTITIONED BY (dt STRING)
LOCATION 's3://foo/bar/partner_stockrecord';
ALTER TABLE `partner_stockrecord` ADD PARTITION (dt = '{dt}');
""".format(dt=dt)
)
self.assertEquals(query, expected_query)
class ImportConditionalOfferTaskTestCase(TestCase):
@with_luigi_config('database-import', 'destination', 's3://foo/bar')
def test_query_with_date(self):
dt = '2014-07-01'
kwargs = {'import_date': datetime.datetime.strptime(dt, '%Y-%m-%d').date()}
task = ImportConditionalOfferTask(**kwargs)
query = task.query()
expected_query = textwrap.dedent(
"""
USE default;
DROP TABLE IF EXISTS `offer_conditionaloffer`;
CREATE EXTERNAL TABLE `offer_conditionaloffer` (
`id` INT,`name` STRING,`slug` STRING,`description` STRING,`offer_type` STRING,`status` STRING,`priority` INT,`start_datetime` TIMESTAMP,`end_datetime` TIMESTAMP,`max_global_applications` INT,`max_user_applications` INT,`max_basket_applications` INT,`max_discount` DECIMAL(12, 2),`total_discount` DECIMAL(12, 2),`num_applications` INT,`num_orders` INT,`redirect_url` STRING,`date_created` TIMESTAMP,`benefit_id` INT,`condition_id` INT,`email_domains` TIMESTAMP,`site_id` INT
)
PARTITIONED BY (dt STRING)
LOCATION 's3://foo/bar/offer_conditionaloffer';
ALTER TABLE `offer_conditionaloffer` ADD PARTITION (dt = '{dt}');
""".format(dt=dt)
)
self.assertEquals(query, expected_query)
class ImportBenefitTaskTestCase(TestCase):
@with_luigi_config('database-import', 'destination', 's3://foo/bar')
def test_query_with_date(self):
dt = '2014-07-01'
kwargs = {'import_date': datetime.datetime.strptime(dt, '%Y-%m-%d').date()}
task = ImportBenefitTask(**kwargs)
query = task.query()
expected_query = textwrap.dedent(
"""
USE default;
DROP TABLE IF EXISTS `offer_benefit`;
CREATE EXTERNAL TABLE `offer_benefit` (
`id` INT,`type` STRING,`value` DECIMAL(12, 2),`max_affected_items` INT,`proxy_class` STRING,`range_id` INT
)
PARTITIONED BY (dt STRING)
LOCATION 's3://foo/bar/offer_benefit';
ALTER TABLE `offer_benefit` ADD PARTITION (dt = '{dt}');
""".format(dt=dt)
)
self.assertEquals(query, expected_query)
...@@ -38,7 +38,8 @@ class TestEnterpriseEnrollmentMysqlTask(TestCase): ...@@ -38,7 +38,8 @@ class TestEnterpriseEnrollmentMysqlTask(TestCase):
'last_activity_date', 'last_activity_date',
'coupon_name', 'coupon_name',
'coupon_code', 'coupon_code',
'final_grade', 'offer',
'current_grade',
'course_price', 'course_price',
'discount_price', 'discount_price',
) )
......
...@@ -39,4 +39,5 @@ INSERT INTO `auth_user` VALUES ...@@ -39,4 +39,5 @@ INSERT INTO `auth_user` VALUES
(11,'test_user','','','test@example.com','0000000000000000000000000000000000000000000000000000000000000000000000000000',0,1,0,'2015-09-09 15:03:48','2015-02-12 23:14:35','w',NULL,'n','',0,NULL,'','',1,0,0), (11,'test_user','','','test@example.com','0000000000000000000000000000000000000000000000000000000000000000000000000000',0,1,0,'2015-09-09 15:03:48','2015-02-12 23:14:35','w',NULL,'n','',0,NULL,'','',1,0,0),
(12,'test_user2','','','test2@example.com','0000000000000000000000000000000000000000000000000000000000000000000000000000',0,1,0,'2015-09-09 15:03:48','2015-02-12 23:14:35','w',NULL,'n','',0,NULL,'','',1,0,0), (12,'test_user2','','','test2@example.com','0000000000000000000000000000000000000000000000000000000000000000000000000000',0,1,0,'2015-09-09 15:03:48','2015-02-12 23:14:35','w',NULL,'n','',0,NULL,'','',1,0,0),
(13,'test_user3','','','test3@example.com','0000000000000000000000000000000000000000000000000000000000000000000000000000',0,1,0,'2015-09-09 15:03:48','2015-02-12 23:14:35','w',NULL,'n','',0,NULL,'','',1,0,0), (13,'test_user3','','','test3@example.com','0000000000000000000000000000000000000000000000000000000000000000000000000000',0,1,0,'2015-09-09 15:03:48','2015-02-12 23:14:35','w',NULL,'n','',0,NULL,'','',1,0,0),
(14,'test_user4','','','test4@example.com','0000000000000000000000000000000000000000000000000000000000000000000000000000',0,1,0,'2015-09-09 15:03:48','2015-02-12 23:14:35','w',NULL,'n','',0,NULL,'','',1,0,0); (14,'test_user4','','','test4@example.com','0000000000000000000000000000000000000000000000000000000000000000000000000000',0,1,0,'2015-09-09 15:03:48','2015-02-12 23:14:35','w',NULL,'n','',0,NULL,'','',1,0,0),
(15,'test_user5','','','test5@example.com','0000000000000000000000000000000000000000000000000000000000000000000000000000',0,1,0,'2015-09-09 15:03:48','2015-02-12 23:14:35','w',NULL,'n','',0,NULL,'','',1,0,0);
...@@ -40,4 +40,5 @@ INSERT INTO `auth_userprofile` VALUES ...@@ -40,4 +40,5 @@ INSERT INTO `auth_userprofile` VALUES
(5, 'Test User', '', 'course.xml', '', '', 1989, 'm', '', '', '', 'US', '', 1, NULL, NULL, 11), (5, 'Test User', '', 'course.xml', '', '', 1989, 'm', '', '', '', 'US', '', 1, NULL, NULL, 11),
(6, 'Test User2', '', 'course.xml', '', '', 1989, 'f', '', '', '', 'US', '', 1, NULL, NULL, 12), (6, 'Test User2', '', 'course.xml', '', '', 1989, 'f', '', '', '', 'US', '', 1, NULL, NULL, 12),
(7, 'Test User3', '', 'course.xml', '', '', 1989, 'm', '', '', '', 'US', '', 1, NULL, NULL, 13), (7, 'Test User3', '', 'course.xml', '', '', 1989, 'm', '', '', '', 'US', '', 1, NULL, NULL, 13),
(8, 'Test User4', '', 'course.xml', '', '', 1989, 'f', '', '', '', 'US', '', 1, NULL, NULL, 14); (8, 'Test User4', '', 'course.xml', '', '', 1989, 'f', '', '', '', 'US', '', 1, NULL, NULL, 14),
(9, 'Test User5', '', 'course.xml', '', '', 1989, 'f', '', '', '', 'US', '', 1, NULL, NULL, 15);
...@@ -25,4 +25,7 @@ INSERT INTO `consent_datasharingconsent` VALUES ...@@ -25,4 +25,7 @@ INSERT INTO `consent_datasharingconsent` VALUES
(3,'2016-03-22 20:59:12.281696','2016-03-22 20:59:12.281696','test_user2',1,'course-v1:edX+Open_DemoX+edx_demo_course2','0381d3cb033846d48a5cb1475b589d7f'), (3,'2016-03-22 20:59:12.281696','2016-03-22 20:59:12.281696','test_user2',1,'course-v1:edX+Open_DemoX+edx_demo_course2','0381d3cb033846d48a5cb1475b589d7f'),
(4,'2016-03-22 21:02:09.195616','2016-03-22 21:02:09.195616','test_user3',1,'course-v1:edX+Open_DemoX+edx_demo_course2','03fc6c3a33d84580842576922275ca6f'), (4,'2016-03-22 21:02:09.195616','2016-03-22 21:02:09.195616','test_user3',1,'course-v1:edX+Open_DemoX+edx_demo_course2','03fc6c3a33d84580842576922275ca6f'),
(5,'2016-03-22 21:04:08.211237','2016-03-22 21:04:08.211237','test_user2',1,'course-v1:edX+Testing102x+1T2017','0381d3cb033846d48a5cb1475b589d7f'), (5,'2016-03-22 21:04:08.211237','2016-03-22 21:04:08.211237','test_user2',1,'course-v1:edX+Testing102x+1T2017','0381d3cb033846d48a5cb1475b589d7f'),
(6,'2016-03-22 21:08:08.432870','2016-03-22 21:08:08.432870','test_user',0,'course-v1:edX+Testing102x+1T2017','0381d3cb033846d48a5cb1475b589d7f'); (6,'2016-03-22 21:08:08.432870','2016-03-22 21:08:08.432870','test_user',0,'course-v1:edX+Testing102x+1T2017','0381d3cb033846d48a5cb1475b589d7f'),
(7,'2014-06-27 16:02:38','2014-06-27 16:02:38','test_user5',1,'edX/Open_DemoX/edx_demo_course','0381d3cb033846d48a5cb1475b589d7f'),
(8,'2016-03-22 20:56:09.320098','2016-03-22 20:56:09.320098','test_user5',1,'course-v1:edX+Open_DemoX+edx_demo_course2','0381d3cb033846d48a5cb1475b589d7f'),
(9,'2016-03-22 21:08:08.432870','2016-03-22 21:08:08.432870','test_user5',1,'course-v1:edX+Testing102x+1T2017','0381d3cb033846d48a5cb1475b589d7f');
...@@ -23,4 +23,7 @@ INSERT INTO `enterprise_enterprisecourseenrollment` VALUES ...@@ -23,4 +23,7 @@ INSERT INTO `enterprise_enterprisecourseenrollment` VALUES
(3,'2016-03-22 20:59:12.281696','2016-03-22 20:59:12.281696','course-v1:edX+Open_DemoX+edx_demo_course2',2), (3,'2016-03-22 20:59:12.281696','2016-03-22 20:59:12.281696','course-v1:edX+Open_DemoX+edx_demo_course2',2),
(4,'2016-03-22 21:02:09.195616','2016-03-22 21:02:09.195616','course-v1:edX+Open_DemoX+edx_demo_course2',3), (4,'2016-03-22 21:02:09.195616','2016-03-22 21:02:09.195616','course-v1:edX+Open_DemoX+edx_demo_course2',3),
(5,'2016-03-22 21:04:08.211237','2016-03-22 21:04:08.211237','course-v1:edX+Testing102x+1T2017',2), (5,'2016-03-22 21:04:08.211237','2016-03-22 21:04:08.211237','course-v1:edX+Testing102x+1T2017',2),
(6,'2016-03-22 21:08:08.432870','2016-03-22 21:08:08.432870','course-v1:edX+Testing102x+1T2017',1); (6,'2016-03-22 21:08:08.432870','2016-03-22 21:08:08.432870','course-v1:edX+Testing102x+1T2017',1),
(7,'2014-06-27 16:02:38','2014-06-27 16:02:38','edX/Open_DemoX/edx_demo_course',4),
(8,'2016-03-22 20:56:09.320098','2016-03-22 20:56:09.320098','course-v1:edX+Open_DemoX+edx_demo_course2',4),
(9,'2016-03-22 21:08:08.432870','2016-03-22 21:08:08.432870','course-v1:edX+Testing102x+1T2017',4);
...@@ -19,4 +19,5 @@ CREATE TABLE `enterprise_enterprisecustomeruser` ( ...@@ -19,4 +19,5 @@ CREATE TABLE `enterprise_enterprisecustomeruser` (
INSERT INTO `enterprise_enterprisecustomeruser` VALUES INSERT INTO `enterprise_enterprisecustomeruser` VALUES
(1,'2017-05-23 19:50:12.480930','2018-01-11 17:18:10.743835',11,'0381d3cb033846d48a5cb1475b589d7f'), (1,'2017-05-23 19:50:12.480930','2018-01-11 17:18:10.743835',11,'0381d3cb033846d48a5cb1475b589d7f'),
(2,'2017-05-30 13:20:05.314463','2018-01-11 17:18:10.793360',12,'0381d3cb033846d48a5cb1475b589d7f'), (2,'2017-05-30 13:20:05.314463','2018-01-11 17:18:10.793360',12,'0381d3cb033846d48a5cb1475b589d7f'),
(3,'2017-06-07 19:53:04.516017','2018-01-11 17:18:10.840584',13,'03fc6c3a33d84580842576922275ca6f'); (3,'2017-06-07 19:53:04.516017','2018-01-11 17:18:10.840584',13,'03fc6c3a33d84580842576922275ca6f'),
(4,'2017-05-23 19:50:12.480930','2018-01-11 17:18:10.743835',15,'0381d3cb033846d48a5cb1475b589d7f');
...@@ -33,4 +33,7 @@ INSERT INTO `grades_persistentcoursegrade` VALUES ...@@ -33,4 +33,7 @@ INSERT INTO `grades_persistentcoursegrade` VALUES
('2017-05-09 16:27:34.090088','2017-06-21 08:26:19.534269',4,13,'course-v1:edX+Open_DemoX+edx_demo_course2','2017-06-06 07:50:15.303000','592d2822c7d5444623e4fde6','Lgr54dD6fJnWX1psNWfej2bF9CU=',.03,'',NULL), ('2017-05-09 16:27:34.090088','2017-06-21 08:26:19.534269',4,13,'course-v1:edX+Open_DemoX+edx_demo_course2','2017-06-06 07:50:15.303000','592d2822c7d5444623e4fde6','Lgr54dD6fJnWX1psNWfej2bF9CU=',.03,'',NULL),
('2017-05-09 16:27:34.396107','2017-06-06 15:15:35.496627',5,12,'course-v1:edX+Testing102x+1T2017','2017-06-05 12:03:25.067000','592d2822c7d5444623e4fde6','Lgr54dD6fJnWX1psNWfej2bF9CU=',.98,'Pass','2017-05-09 16:27:33.526363'), ('2017-05-09 16:27:34.396107','2017-06-06 15:15:35.496627',5,12,'course-v1:edX+Testing102x+1T2017','2017-06-05 12:03:25.067000','592d2822c7d5444623e4fde6','Lgr54dD6fJnWX1psNWfej2bF9CU=',.98,'Pass','2017-05-09 16:27:33.526363'),
('2017-05-09 16:27:34.460666','2017-09-22 01:15:51.524507',6,11,'course-v1:edX+Testing102x+1T2017','2017-09-21 19:57:46.390000','592d2822c7d5444623e4fde6','Lgr54dD6fJnWX1psNWfej2bF9CU=',.64,'',NULL), ('2017-05-09 16:27:34.460666','2017-09-22 01:15:51.524507',6,11,'course-v1:edX+Testing102x+1T2017','2017-09-21 19:57:46.390000','592d2822c7d5444623e4fde6','Lgr54dD6fJnWX1psNWfej2bF9CU=',.64,'',NULL),
('2017-05-09 16:27:34.661796','2017-05-24 07:22:04.981837',7,14,'course-v1:edX+Testing102x+1T2017','2017-05-19 23:08:02.344000','592d2822c7d5444623e4fde6','Lgr54dD6fJnWX1psNWfej2bF9CU=',.75,'Pass','2017-05-09 16:27:34.690065'); ('2017-05-09 16:27:34.661796','2017-05-24 07:22:04.981837',7,14,'course-v1:edX+Testing102x+1T2017','2017-05-19 23:08:02.344000','592d2822c7d5444623e4fde6','Lgr54dD6fJnWX1psNWfej2bF9CU=',.75,'Pass','2017-05-09 16:27:34.690065'),
\ No newline at end of file ('2017-05-09 16:27:33.421413','2017-07-06 16:42:00.613812',8,15,'edX/Open_DemoX/edx_demo_course','2017-05-30 08:06:58.485000','592d2822c7d5444623e4fde6','Lgr54dD6fJnWX1psNWfej2bF9CU=',.85,'Pass','2017-05-09 16:27:34.690065'),
('2017-05-09 16:27:33.519065','2017-07-22 09:24:36.149447',9,15,'course-v1:edX+Open_DemoX+edx_demo_course2','2017-06-09 14:39:18.871000','592d2822c7d5444623e4fde6','Lgr54dD6fJnWX1psNWfej2bF9CU=',.5,'',NULL),
('2017-05-09 16:27:34.460666','2017-09-22 01:15:51.524507',10,15,'course-v1:edX+Testing102x+1T2017','2017-09-21 19:57:46.390000','592d2822c7d5444623e4fde6','Lgr54dD6fJnWX1psNWfej2bF9CU=',.74,'',NULL);
\ No newline at end of file
...@@ -20,4 +20,5 @@ CREATE TABLE `social_auth_usersocialauth` ( ...@@ -20,4 +20,5 @@ CREATE TABLE `social_auth_usersocialauth` (
INSERT INTO `social_auth_usersocialauth` VALUES INSERT INTO `social_auth_usersocialauth` VALUES
(1,11,'tpa-saml','ent1:harry', '{}'), (1,11,'tpa-saml','ent1:harry', '{}'),
(2,12,'tpa-saml','ent1:ron', '{}'), (2,12,'tpa-saml','ent1:ron', '{}'),
(3,13,'tpa-saml','ent2:hermione', '{}'); (3,13,'tpa-saml','ent2:hermione', '{}'),
(4,15,'tpa-saml','ent1:ginny', '{}');
...@@ -23,4 +23,7 @@ INSERT INTO `student_courseenrollment` VALUES ...@@ -23,4 +23,7 @@ INSERT INTO `student_courseenrollment` VALUES
(27,13,'course-v1:edX+Open_DemoX+edx_demo_course2','2016-03-22 21:02:09.195616',1,'no-id-professional'), (27,13,'course-v1:edX+Open_DemoX+edx_demo_course2','2016-03-22 21:02:09.195616',1,'no-id-professional'),
(28,12,'course-v1:edX+Testing102x+1T2017','2016-03-22 21:04:08.211237',1,'no-id-professional'), (28,12,'course-v1:edX+Testing102x+1T2017','2016-03-22 21:04:08.211237',1,'no-id-professional'),
(29,11,'course-v1:edX+Testing102x+1T2017','2016-03-22 21:08:08.432870',1,'credit'), (29,11,'course-v1:edX+Testing102x+1T2017','2016-03-22 21:08:08.432870',1,'credit'),
(30,14,'course-v1:edX+Testing102x+1T2017','2016-03-22 21:08:08.432870',1,'credit'); (30,14,'course-v1:edX+Testing102x+1T2017','2016-03-22 21:08:08.432870',1,'credit'),
(31,15,'edX/Open_DemoX/edx_demo_course','2014-06-27 16:02:38',1,'verified'),
(32,15,'course-v1:edX+Open_DemoX+edx_demo_course2','2016-03-22 20:56:09.320098',1,'verified'),
(33,15,'course-v1:edX+Testing102x+1T2017','2016-03-22 21:08:08.432870',1,'credit');
...@@ -31,12 +31,13 @@ INSERT INTO `catalogue_product` VALUES ...@@ -31,12 +31,13 @@ INSERT INTO `catalogue_product` VALUES
(2,'child',NULL,'A demonstration course (ID verified)','demo-demox-democourse-1T2015-id-verified','',NULL,'2015-08-06 19:06:21','2015-08-06 19:21:06',1,1,NULL,'edX/Open_DemoX/edx_demo_course','2016-12-12 00:00:00'), (2,'child',NULL,'A demonstration course (ID verified)','demo-demox-democourse-1T2015-id-verified','',NULL,'2015-08-06 19:06:21','2015-08-06 19:21:06',1,1,NULL,'edX/Open_DemoX/edx_demo_course','2016-12-12 00:00:00'),
(3,'parent',NULL,'Seat in edX Demo Course 2','seat-in','',NULL,'2016-03-22 20:32:49.444111','2016-03-22 20:32:49.476687',1,NULL,1,'course-v1:edX+Open_DemoX+edx_demo_course2',NULL), (3,'parent',NULL,'Seat in edX Demo Course 2','seat-in','',NULL,'2016-03-22 20:32:49.444111','2016-03-22 20:32:49.476687',1,NULL,1,'course-v1:edX+Open_DemoX+edx_demo_course2',NULL),
(4,'child',NULL,'Seat in edX Demo Course 2','seat-in-test-otto-verified-course','',NULL,'2016-03-22 20:32:49.520169','2016-03-22 20:32:49.520208',1,3,NULL,'course-v1:edX+Open_DemoX+edx_demo_course2',NULL), (4,'child',NULL,'Seat in edX Demo Course 2','seat-in-test-otto-verified-course','',NULL,'2016-03-22 20:32:49.520169','2016-03-22 20:32:49.520208',1,3,NULL,'course-v1:edX+Open_DemoX+edx_demo_course2',NULL),
(5,'child',NULL,'Seat in edX Demo Verified Course 2 with verified certificate (and ID verification)','seat-in-test-otto-verified-course-with-verified-certificate-and-id-verification','',NULL,'2016-03-22 20:32:49.582976','2016-03-22 20:32:49.583011',1,3,NULL,'course-v1:edX+Open_DemoX+edx_demo_course2+Verified',NULL), (5,'child',NULL,'Seat in edX Demo Verified Course 2 with verified certificate (and ID verification)','seat-in-test-otto-verified-course-with-verified-certificate-and-id-verification','',NULL,'2016-03-22 20:32:49.582976','2016-03-22 20:32:49.583011',1,3,NULL,'course-v1:edX+Open_DemoX+edx_demo_course2',NULL),
(6,'parent',NULL,'Seat in edX Demo Professional Course 2','seat-in','',NULL,'2016-03-22 20:33:29.480679','2016-03-22 20:33:29.589327',1,NULL,1,'course-v1:edX+Open_DemoX+edx_demo_course2+Professional',NULL), (6,'parent',NULL,'Seat in edX Demo Professional Course 2','seat-in','',NULL,'2016-03-22 20:33:29.480679','2016-03-22 20:33:29.589327',1,NULL,1,'course-v1:edX+Open_DemoX+edx_demo_course2',NULL),
(7,'child',NULL,'Seat in edX Demo Professional Course with professional certificate','seat-in-test-otto-professional-course-with-professional-certificate','',NULL,'2016-03-22 20:33:29.609508','2016-03-22 20:33:29.609558',1,6,NULL,'course-v1:edX+Open_DemoX+edx_demo_course2+Professional',NULL), (7,'child',NULL,'Seat in edX Demo Professional Course with professional certificate','seat-in-test-otto-professional-course-with-professional-certificate','',NULL,'2016-03-22 20:33:29.609508','2016-03-22 20:33:29.609558',1,6,NULL,'course-v1:edX+Open_DemoX+edx_demo_course2',NULL),
(12,'standalone',NULL,'AccTest 25% off Otto Verified','578E9F3544','',NULL,'2016-03-22 20:44:23.266854','2016-03-22 20:44:23.310765',1,NULL,3,NULL,NULL), (12,'standalone',NULL,'AccTest 25% off Otto Verified','578E9F3544','',NULL,'2016-03-22 20:44:23.266854','2016-03-22 20:44:23.310765',1,NULL,3,NULL,NULL),
(13,'standalone',NULL,'AccTest $200 off Otto Prof','92D741F650','',NULL,'2016-03-22 20:46:39.846749','2016-03-22 20:46:39.958757',1,NULL,3,NULL,NULL), (13,'standalone',NULL,'AccTest $200 off Otto Prof','92D741F650','',NULL,'2016-03-22 20:46:39.846749','2016-03-22 20:46:39.958757',1,NULL,3,NULL,NULL),
(14,'standalone',NULL,'AccTest Otto Pro Enroll Code','450483FB7B','',NULL,'2016-03-22 20:47:58.279367','2016-03-22 20:47:58.384073',1,NULL,3,NULL,NULL), (14,'standalone',NULL,'AccTest Otto Pro Enroll Code','450483FB7B','',NULL,'2016-03-22 20:47:58.279367','2016-03-22 20:47:58.384073',1,NULL,3,NULL,NULL),
(15,'standalone',NULL,'AccTest 40% off Otto Credit','901A4FE566','',NULL,'2016-03-22 20:50:27.485071','2016-03-22 20:50:27.538182',1,NULL,3,NULL,NULL), (15,'standalone',NULL,'AccTest 40% off Otto Credit','901A4FE566','',NULL,'2016-03-22 20:50:27.485071','2016-03-22 20:50:27.538182',1,NULL,3,NULL,NULL),
(16,'parent',NULL,'edX Test Course','parent-demo-edx-Testing-1T2017','',NULL,'2015-08-06 19:06:21','2015-08-06 19:21:06',1,NULL,1,'course-v1:edX+Testing102x+1T2017',NULL), (16,'parent',NULL,'edX Test Course','parent-demo-edx-Testing-1T2017','',NULL,'2015-08-06 19:06:21','2015-08-06 19:21:06',1,NULL,1,'course-v1:edX+Testing102x+1T2017',NULL),
(17,'child',NULL,'edX Test Course (ID verified)','demo-edx-Testing-1T2017-id-verified','',NULL,'2015-08-06 19:06:21','2015-08-06 19:21:06',1,1,NULL,'course-v1:edX+Testing102x+1T2017','2016-12-12 00:00:00'); (17,'child',NULL,'edX Test Course (ID verified)','demo-edx-Testing-1T2017-id-verified','',NULL,'2015-08-06 19:06:21','2015-08-06 19:21:06',1,1,NULL,'course-v1:edX+Testing102x+1T2017','2016-12-12 00:00:00'),
\ No newline at end of file (18,'child',NULL,'A demonstration course (audit track)','demo-demox-democourse-1T2015-audit','',NULL,'2015-08-06 19:06:21','2015-08-06 19:21:06',0,1,NULL,'edX/Open_DemoX/edx_demo_course','2016-12-12 00:00:00');
\ No newline at end of file
--
-- Table structure for table `ecommerce_user`
--
DROP TABLE IF EXISTS `ecommerce_user`;
CREATE TABLE `ecommerce_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`password` varchar(128) NOT NULL,
`last_login` datetime DEFAULT NULL,
`is_superuser` tinyint(1) NOT NULL,
`username` varchar(30) NOT NULL,
`first_name` varchar(30) NOT NULL,
`last_name` varchar(30) NOT NULL,
`email` varchar(254) NOT NULL,
`is_staff` tinyint(1) NOT NULL,
`is_active` tinyint(1) NOT NULL,
`date_joined` datetime NOT NULL,
`tracking_context` longtext,
`full_name` varchar(255),
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `ecommerce_user`
--
INSERT INTO `ecommerce_user` VALUES
(39,'0000000000000000000000000000000000000000','2015-09-11 16:38:05.627130',0,'test_user','Test','User','test@example.com',0,0,'2015-04-02 16:38:09','{\"lms_user_id\":11,\"lms_client_id\":\"0000000000.0000000000\"}','Test User'),
(40,'0000000000000000000000000000000000000000','2015-09-11 16:38:05.627130',0,'test_user2','Test','User2','test2@example.com',0,0,'2015-04-02 16:38:09','{\"lms_user_id\":12,\"lms_client_id\":\"0000000000.0000000000\"}','Test User2'),
(41,'0000000000000000000000000000000000000000','2015-09-11 16:38:05.627130',0,'test_user3','Test','User3','test3@example.com',0,0,'2015-04-02 16:38:09','{\"lms_user_id\":13,\"lms_client_id\":\"0000000000.0000000000\"}','Test User3'),
(42,'0000000000000000000000000000000000000000','2015-09-11 16:38:05.627130',0,'test_user4','Test','User4','test4@example.com',0,0,'2015-04-02 16:38:09','{\"lms_user_id\":14,\"lms_client_id\":\"0000000000.0000000000\"}','Test User4'),
(43,'0000000000000000000000000000000000000000','2015-09-11 16:38:05.627130',0,'test_user5','Test','User5','test5@example.com',0,0,'2015-04-02 16:38:09','{\"lms_user_id\":15,\"lms_client_id\":\"0000000000.0000000000\"}','Test User5');
--
-- Table structure for table `offer_benefit`
--
DROP TABLE IF EXISTS `offer_benefit`;
CREATE TABLE `offer_benefit` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(128) NOT NULL,
`value` decimal(12,2) DEFAULT NULL,
`max_affected_items` int(10) unsigned DEFAULT NULL,
`proxy_class` varchar(255) DEFAULT NULL,
`range_id` int(11),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `offer_benefit`
--
INSERT INTO `offer_benefit` VALUES
(1,'Percentage',25.00,NULL,NULL,1),
(2,'Percentage',100.00,NULL,NULL,2),
(3,'Absolute',100.00,NULL,NULL,3),
(4,'Absolute',50.00,NULL,NULL,4),
(5,'Percentage',50.00,NULL,NULL,5),
(6,'Percentage',100.00,NULL,NULL,6),
(7,'Absolute',100.00,NULL,NULL,7),
(8,'',100.00,NULL,'ecommerce.enterprise.benefits.EnterprisePercentageDiscountBenefit',NULL);
\ No newline at end of file
--
-- Table structure for table `offer_conditionaloffer`
--
DROP TABLE IF EXISTS `offer_conditionaloffer`;
CREATE TABLE `offer_conditionaloffer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`slug` varchar(128) NOT NULL,
`description` longtext NOT NULL,
`offer_type` varchar(128) NOT NULL,
`status` varchar(64) NOT NULL,
`priority` int(11) NOT NULL,
`start_datetime` datetime DEFAULT NULL,
`end_datetime` datetime DEFAULT NULL,
`max_global_applications` int(10) unsigned DEFAULT NULL,
`max_user_applications` int(10) unsigned DEFAULT NULL,
`max_basket_applications` int(10) unsigned DEFAULT NULL,
`max_discount` decimal(12,2) DEFAULT NULL,
`total_discount` decimal(12,2) NOT NULL,
`num_applications` int(10) unsigned NOT NULL,
`num_orders` int(10) unsigned NOT NULL,
`redirect_url` varchar(200) NOT NULL,
`date_created` datetime NOT NULL,
`benefit_id` int(11) NOT NULL,
`condition_id` int(11) NOT NULL,
`email_domains` varchar(255),
`site_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `offer_conditionaloffer`
--
INSERT INTO `offer_conditionaloffer` VALUES
(1,'Catalog [4]-Percentage-25','catalog-4-percentage-25','','Voucher','Open',0,NULL,NULL,NULL,NULL,NULL,NULL,100.00,1,1,'','2017-05-31 19:18:14',1,1,NULL,1),
(2,'Catalog [5]-Percentage-100','catalog-5-percentage-100','','Voucher','Open',0,NULL,NULL,NULL,NULL,NULL,NULL,100.00,1,1,'','2017-05-31 19:18:14',2,2,NULL,1),
(3,'Catalog [5]-Absolute-100','catalog-5-absolute-100','','Voucher','Open',0,NULL,NULL,NULL,NULL,NULL,NULL,100.00,1,1,'','2017-05-31 19:18:14',3,3,NULL,1),
(4,'Catalog [5]-Absolute-50','catalog-5-absolute-50','','Voucher','Open',0,NULL,NULL,NULL,NULL,NULL,NULL,100.00,1,1,'','2017-05-31 19:18:14',4,4,NULL,1),
(5,'Catalog [5]-Percentage-50','catalog-5-percentage-50','','Voucher','Open',0,NULL,NULL,NULL,NULL,NULL,NULL,100.00,1,1,'','2017-05-31 19:18:14',5,5,NULL,1),
(6,'Discount 1','discount-1','','Site','Open',0,NULL,NULL,NULL,NULL,NULL,NULL,100.00,1,1,'','2017-05-31 19:18:14',6,6,NULL,1),
(7,'Discount 2','discount-2','','Site','Open',0,NULL,NULL,NULL,NULL,NULL,NULL,100.00,1,1,'','2017-05-31 19:18:14',7,7,NULL,1),
(8,'Discount 3','discount-3','','Site','Open',0,NULL,NULL,NULL,NULL,NULL,NULL,100.00,1,1,'','2017-05-31 19:18:14',8,8,NULL,1);
...@@ -34,8 +34,14 @@ CREATE TABLE `order_line` ( ...@@ -34,8 +34,14 @@ CREATE TABLE `order_line` (
-- --
INSERT INTO `order_line` VALUES INSERT INTO `order_line` VALUES
(1,'edX','D354B6A','','','Seat in edX Demo Course with verified certificate (and ID verification)','',1,256.00,256.00,256.00,256.00,NULL,256.00,256.00,NULL,'Complete',NULL,1,1,2,1), (1,'edX','D354B6A','','','A demonstration course (ID verified)','',1,300.00,300.00,300.00,300.00,300.00,300.00,300.00,300.00,'Complete',NULL,1,1,2,1),
(2,'edX','D354B6A','','','Seat in edX Demo Verified Course 2 with verified certificate (and ID verification)','',1,192.00,192.00,256.00,256.00,NULL,256.00,256.00,NULL,'Complete',NULL,2,1,5,2), (2,'edX','D354B6A','','','Seat in edX Demo Verified Course 2 with verified certificate (and ID verification)','',1,200.00,200.00,200.00,200.00,200.00,200.00,200.00,200.00,'Complete',NULL,2,1,5,3),
(3,'edX','CF9A708','','','Seat in edX Demo Professional Course 2 with professional certificate','',1,0.00,0.00,1000.00,1000.00,NULL,1000.00,1000.00,NULL,'Complete',NULL,3,1,7,3), (3,'edX','CF9A708','','','Seat in edX Demo Verified Course 2 with verified certificate (and ID verification)','',1,200.00,200.00,200.00,200.00,200.00,200.00,200.00,200.00,'Complete',NULL,3,1,5,3),
(4,'edX','CF9A708','','','Seat in edX Demo Professional Course with professional certificate certificate','',1,0.00,0.00,1000.00,1000.00,NULL,1000.00,1000.00,NULL,'Complete',NULL,4,1,4,3), (4,'edX','CF9A708','','','Seat in edX Demo Professional Course with professional certificate','',1,100.00,100.00,100.00,100.00,100.00,100.00,100.00,100.00,'Complete',NULL,4,1,7,4),
(5,'edX','CF9A708','','','Seat in Test Verified Course','',1,0.00,0.00,1000.00,1000.00,NULL,1000.00,1000.00,NULL,'Complete',NULL,5,1,17,3); (5,'edX','CF9A708','','','edX Test Course (ID verified)','',1,100.00,100.00,100.00,100.00,100.00,100.00,100.00,100.00,'Complete',NULL,5,1,17,5),
(6,'edX','D354B6A','','','edX Test Course (ID verified)','',1,100.00,100.00,100.00,100.00,100.00,100.00,100.00,100.00,'Complete',NULL,6,1,17,5),
(7,'edX','D354B6A','','','edX Test Course (ID verified)','',1,100.00,100.00,100.00,100.00,100.00,100.00,100.00,100.00,'Complete',NULL,7,1,17,5),
(8,'edX','CF9A708','','','A demonstration course (ID verified)','',1,300.00,300.00,300.00,300.00,300.00,300.00,300.00,300.00,'Complete',NULL,8,1,2,1),
(9,'edX','CF9A708','','','Seat in edX Demo Verified Course 2 with verified certificate (and ID verification)','',1,200.00,200.00,200.00,200.00,200.00,200.00,200.00,200.00,'Complete',NULL,9,1,5,3),
(10,'edX','CF9A708','','','edX Test Course (ID verified)','',1,100.00,100.00,100.00,100.00,100.00,100.00,100.00,100.00,'Complete',NULL,10,1,17,5),
(11,'edX','CF9A708','','','A demonstration course (ID verified)','',1,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,'Complete',NULL,11,1,18,6);
...@@ -30,8 +30,14 @@ CREATE TABLE `order_order` ( ...@@ -30,8 +30,14 @@ CREATE TABLE `order_order` (
-- --
INSERT INTO `order_order` VALUES INSERT INTO `order_order` VALUES
(1,'EDX-100019','USD',156.00,256.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 20:57:10.353473',19,NULL,NULL,1,38), (1,'EDX-100019','USD',156.00,156.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 20:57:10.353473',19,NULL,NULL,1,39),
(2,'EDX-100020','USD',192.00,192.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 20:59:58.292441',20,NULL,NULL,1,40), (2,'EDX-100020','USD',192.00,192.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 20:59:58.292441',20,NULL,NULL,1,39),
(3,'EDX-100021','USD',10.00,0.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 21:02:09.032234',21,NULL,NULL,1,38), (3,'EDX-100021','USD',10.00,10.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 21:02:09.032234',21,NULL,NULL,1,40),
(4,'EDX-100022','USD',120.00,800.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 21:04:08.048200',22,NULL,NULL,1,40), (4,'EDX-100022','USD',20.00,20.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 21:04:08.048200',22,NULL,NULL,1,41),
(5,'EDX-100023','USD',60.00,60.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 21:09:45.318743',23,NULL,NULL,1,38); (5,'EDX-100023','USD',60.00,60.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 21:09:45.318743',23,NULL,NULL,1,40),
(6,'EDX-100024','USD',56.00,56.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 20:57:10.353473',24,NULL,NULL,1,39),
(7,'EDX-100025','USD',100.00,100.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 20:59:58.292441',25,NULL,NULL,1,42),
(8,'EDX-100026','USD',56.00,56.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 21:02:09.032234',26,NULL,NULL,1,43),
(9,'EDX-100027','USD',20.00,20.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 21:04:08.048200',27,NULL,NULL,1,43),
(10,'EDX-100028','USD',60.00,60.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 21:09:45.318743',28,NULL,NULL,1,43),
(11,'EDX-100029','USD',0.00,0.00,0.00,0.00,'No shipping required','no-shipping-required','Complete','','2016-03-22 21:02:09.032234',29,NULL,NULL,1,43);
...@@ -22,8 +22,12 @@ CREATE TABLE `order_orderdiscount` ( ...@@ -22,8 +22,12 @@ CREATE TABLE `order_orderdiscount` (
-- --
INSERT INTO `order_orderdiscount` VALUES INSERT INTO `order_orderdiscount` VALUES
(1,'Basket',1,'Catalog [4]-Percentage-25',1,'OTTO_VER_25_PCT_OFF',1,64.00,'',1), (1,'Basket',1,'Catalog [4]-Percentage-25',1,'PJS4LCU435W6KGBS',1,64.00,'',1),
(2,'Basket',2,'Catalog [5]-Percentage-100',2,'VFF5A4MVV5KMNSQE',1,100.00,'',2), (2,'Basket',2,'Catalog [5]-Percentage-100',2,'OTTO_VER_25_PCT_OFF',1,100.00,'',2),
(3,'Basket',3,'Catalog [5]-Absolute-100',3,'OTTO_PRO_200_USD_OFF',1,200.00,'',3), (3,'Basket',3,'Catalog [5]-Absolute-100',3,'QAFWBFZ26GYYYIJS',1,200.00,'',3),
(4,'Basket',4,'Catalog [5]-Absolute-50',4,'OTTO_PRO_200_USD_OFF',1,200.00,'',4), (4,'Basket',4,'Catalog [5]-Absolute-50',4,'ZSJHRVLCNTT6XFCJ',1,200.00,'',4),
(5,'Basket',5,'Catalog [5]-Absolute-50',5,'OTTO_PRO_200_USD_OFF',1,200.00,'',5); (5,'Basket',5,'Catalog [5]-Percentage-50',5,'CQHVBDLY35WSJRZ4',1,200.00,'',5),
(6,'Basket',2,'Catalog [5]-Percentage-100',2,'OTTO_VER_25_PCT_OFF',1,100.00,'',6),
(7,'Basket',6,'Catalog [5]-Absolute-100',NULL,'',1,200.00,'',8),
(8,'Basket',7,'Catalog [5]-Absolute-50',NULL,'',1,200.00,'',9),
(9,'Basket',8,'Catalog [5]-Absolute-50',NULL,'',1,200.00,'',10);
...@@ -32,4 +32,5 @@ INSERT INTO `partner_stockrecord` VALUES ...@@ -32,4 +32,5 @@ INSERT INTO `partner_stockrecord` VALUES
(2,'8CF08E5','USD',100.00,NULL,NULL,NULL,NULL,NULL,'2017-06-07 18:42:40.592853','2018-01-17 21:19:17.111078',1,4), (2,'8CF08E5','USD',100.00,NULL,NULL,NULL,NULL,NULL,'2017-06-07 18:42:40.592853','2018-01-17 21:19:17.111078',1,4),
(3,'D36213B','USD',200.00,NULL,NULL,NULL,NULL,NULL,'2017-06-08 20:02:29.482358','2017-06-08 20:02:29.482387',1,5), (3,'D36213B','USD',200.00,NULL,NULL,NULL,NULL,NULL,'2017-06-08 20:02:29.482358','2017-06-08 20:02:29.482387',1,5),
(4,'2278263','USD',100.00,NULL,NULL,NULL,NULL,NULL,'2017-06-08 21:17:07.233266','2017-06-08 21:17:07.233296',1,7), (4,'2278263','USD',100.00,NULL,NULL,NULL,NULL,NULL,'2017-06-08 21:17:07.233266','2017-06-08 21:17:07.233296',1,7),
(5,'1D654A0','USD',100.00,NULL,NULL,NULL,NULL,NULL,'2017-06-12 09:04:57.693314','2017-06-12 09:04:57.693343',1,17); (5,'1D654A0','USD',100.00,NULL,NULL,NULL,NULL,NULL,'2017-06-12 09:04:57.693314','2017-06-12 09:04:57.693343',1,17),
(6,'683FFFF','USD',0.00,NULL,NULL,NULL,NULL,NULL,'2017-06-07 18:42:40.561668','2018-01-17 21:19:17.146064',1,18);
...@@ -19,8 +19,8 @@ CREATE TABLE `voucher_voucher` ( ...@@ -19,8 +19,8 @@ CREATE TABLE `voucher_voucher` (
) ENGINE=InnoDB AUTO_INCREMENT=489 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=489 DEFAULT CHARSET=utf8;
INSERT INTO `voucher_voucher` VALUES INSERT INTO `voucher_voucher` VALUES
(1,'Pied Piper Discount','RNBL737ZAUJXUM6E','Multi-use','2017-06-01 00:00:00.000000','2025-08-31 00:00:00.000000',0,66,662.00,'2017-06-08 00:00:00.000000'), (1,'Pied Piper Discount','PJS4LCU435W6KGBS','Multi-use','2017-06-01 00:00:00.000000','2025-08-31 00:00:00.000000',0,66,662.00,'2017-06-08 00:00:00.000000'),
(2,'Aviato ','PIPNJSUK33P7PTZH','Multi-use','2017-06-01 00:00:00.000000','2025-08-31 00:00:00.000000',0,2,200.00,'2017-06-08 00:00:00.000000'), (2,'Aviato','OTTO_VER_25_PCT_OFF','Multi-use','2017-06-01 00:00:00.000000','2025-08-31 00:00:00.000000',0,2,200.00,'2017-06-08 00:00:00.000000'),
(3,'ENT - Email domain restricted','ENT10','Multi-use','2017-06-01 00:00:00.000000','2017-12-31 00:00:00.000000',0,1,0.00,'2017-06-12 00:00:00.000000'), (3,'ENT - Email domain restricted','QAFWBFZ26GYYYIJS','Multi-use','2017-06-01 00:00:00.000000','2017-12-31 00:00:00.000000',0,1,0.00,'2017-06-12 00:00:00.000000'),
(4,'ENT - No restrictions','ENT20','Multi-use','2017-06-01 00:00:00.000000','2017-12-31 00:00:00.000000',0,1,20.00,'2017-06-12 00:00:00.000000'), (4,'ENT - No restrictions','ZSJHRVLCNTT6XFCJ','Multi-use','2017-06-01 00:00:00.000000','2017-12-31 00:00:00.000000',0,1,20.00,'2017-06-12 00:00:00.000000'),
(5,'ENT - Discount','ENT21','Multi-use','2017-06-01 00:00:00.000000','2017-12-31 00:00:00.000000',0,1,20.00,'2017-06-12 00:00:00.000000'); (5,'ENT - Discount','CQHVBDLY35WSJRZ4','Multi-use','2017-06-01 00:00:00.000000','2017-12-31 00:00:00.000000',0,1,20.00,'2017-06-12 00:00:00.000000');
...@@ -76,40 +76,62 @@ class EnterpriseEnrollmentAcceptanceTest(AcceptanceTestCase): ...@@ -76,40 +76,62 @@ class EnterpriseEnrollmentAcceptanceTest(AcceptanceTestCase):
datetime.datetime(2016, 3, 22, 20, 59, 12), 'verified', 1, '', 0, None, 'ron', 1, datetime.datetime(2016, 3, 22, 20, 59, 12), 'verified', 1, '', 0, None, 'ron', 1,
'All about acceptance testing!', datetime.datetime(2016, 6, 1, 0, 0), datetime.datetime(2016, 9, 1, 0, 0), 'All about acceptance testing!', datetime.datetime(2016, 6, 1, 0, 0), datetime.datetime(2016, 9, 1, 0, 0),
'self_paced', 'Self Paced', 3, 5, datetime.datetime(2015, 2, 12, 23, 14, 35), 'test2@example.com', 'self_paced', 'Self Paced', 3, 5, datetime.datetime(2015, 2, 12, 23, 14, 35), 'test2@example.com',
'test_user2', 'edX+Open_DemoX', 'US', None, 'ENT - No restrictions', 'ENT20', 0, 200.00, 120.00], 'test_user2', 'edX+Open_DemoX', 'US', None, 'ENT - Email domain restricted', 'QAFWBFZ26GYYYIJS', None, 0,
200.00, 10.00],
['03fc6c3a33d84580842576922275ca6f', '2nd Enterprise', 13, 3, 'course-v1:edX+Open_DemoX+edx_demo_course2', ['03fc6c3a33d84580842576922275ca6f', '2nd Enterprise', 13, 3, 'course-v1:edX+Open_DemoX+edx_demo_course2',
datetime.datetime(2016, 3, 22, 21, 2, 9), 'no-id-professional', 1, '', 0, None, 'hermione', 1, datetime.datetime(2016, 3, 22, 21, 2, 9), 'no-id-professional', 1, '', 0, None, 'hermione', 1,
'All about acceptance testing!', datetime.datetime(2016, 6, 1, 0, 0), datetime.datetime(2016, 9, 1, 0, 0), 'All about acceptance testing!', datetime.datetime(2016, 6, 1, 0, 0), datetime.datetime(2016, 9, 1, 0, 0),
'self_paced', 'Self Paced', 3, 5, datetime.datetime(2015, 2, 12, 23, 14, 35), 'test3@example.com', 'self_paced', 'Self Paced', 3, 5, datetime.datetime(2015, 2, 12, 23, 14, 35), 'test3@example.com',
'test_user3', 'edX+Open_DemoX', 'US', datetime.date(2015, 9, 9), 'ENT - No restrictions', 'ENT20', 0.03, 200.00, 120.00], 'test_user3', 'edX+Open_DemoX', 'US', datetime.date(2015, 9, 9), 'ENT - No restrictions',
'ZSJHRVLCNTT6XFCJ', None, 0.03, 100.00, 20.00],
['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 11, 1, 'course-v1:edX+Open_DemoX+edx_demo_course2', ['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 11, 1, 'course-v1:edX+Open_DemoX+edx_demo_course2',
datetime.datetime(2016, 3, 22, 20, 56, 9), 'verified', 1, '', 0, None, 'harry', 1, datetime.datetime(2016, 3, 22, 20, 56, 9), 'verified', 1, '', 0, None, 'harry', 1,
'All about acceptance testing!', datetime.datetime(2016, 6, 1, 0, 0), datetime.datetime(2016, 9, 1, 0, 0), 'All about acceptance testing!', datetime.datetime(2016, 6, 1, 0, 0), datetime.datetime(2016, 9, 1, 0, 0),
'self_paced', 'Self Paced', 3, 5, datetime.datetime(2015, 2, 12, 23, 14, 35), 'test@example.com', 'self_paced', 'Self Paced', 3, 5, datetime.datetime(2015, 2, 12, 23, 14, 35), 'test@example.com',
'test_user', 'edX+Open_DemoX', 'US', None, 'ENT - No restrictions', 'ENT20', 0.4, 200.00, 120.00], 'test_user', 'edX+Open_DemoX', 'US', None, 'Aviato', 'OTTO_VER_25_PCT_OFF', None, 0.4, 200.00, 192.00],
['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 12, 2, 'course-v1:edX+Testing102x+1T2017', ['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 12, 2, 'course-v1:edX+Testing102x+1T2017',
datetime.datetime(2016, 3, 22, 21, 4, 8), 'no-id-professional', 1, 'Pass', 1, datetime.datetime(2016, 3, 22, 21, 4, 8), 'no-id-professional', 1, 'Pass', 1,
datetime.datetime(2017, 5, 9, 16, 27, 34), 'ron', 1, 'All about acceptance testing Part 3!', datetime.datetime(2017, 5, 9, 16, 27, 34), 'ron', 1, 'All about acceptance testing Part 3!',
datetime.datetime(2016, 12, 1, 0, 0), datetime.datetime(2017, 2, 1, 0, 0), 'instructor_paced', '9', 2, 5, datetime.datetime(2016, 12, 1, 0, 0), datetime.datetime(2017, 2, 1, 0, 0), 'instructor_paced', '9', 2, 5,
datetime.datetime(2015, 2, 12, 23, 14, 35), 'test2@example.com', 'test_user2', 'edX+Testing102', datetime.datetime(2015, 2, 12, 23, 14, 35), 'test2@example.com', 'test_user2', 'edX+Testing102',
'US', datetime.date(2015, 9, 9), 'ENT - Discount', 'ENT21', 0.98, 200, 60.00], 'US', datetime.date(2015, 9, 9), 'ENT - Discount', 'CQHVBDLY35WSJRZ4', None, 0.98, 100.00, 60.00],
['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 11, 1, 'course-v1:edX+Testing102x+1T2017', ['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 11, 1, 'course-v1:edX+Testing102x+1T2017',
datetime.datetime(2016, 3, 22, 21, 8, 8), 'credit', 0, '', 0, None, 'harry', 1, datetime.datetime(2016, 3, 22, 21, 8, 8), 'credit', 0, '', 0, None, 'harry', 1,
'All about acceptance testing Part 3!', datetime.datetime(2016, 12, 1, 0, 0), 'All about acceptance testing Part 3!', datetime.datetime(2016, 12, 1, 0, 0),
datetime.datetime(2017, 2, 1, 0, 0), 'instructor_paced', '9', 2, 5, datetime.datetime(2017, 2, 1, 0, 0), 'instructor_paced', '9', 2, 5,
datetime.datetime(2015, 2, 12, 23, 14, 35), 'test@example.com', 'test_user', 'edX+Testing102', datetime.datetime(2015, 2, 12, 23, 14, 35), 'test@example.com', 'test_user', 'edX+Testing102',
'US', datetime.date(2015, 9, 9), 'ENT - Discount', 'ENT21', 0.64, 200.00, 60.00], 'US', datetime.date(2015, 9, 9), 'Aviato', 'OTTO_VER_25_PCT_OFF', None, 0.64, 100.00, 56.00],
['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 11, 1, 'edX/Open_DemoX/edx_demo_course', ['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 11, 1, 'edX/Open_DemoX/edx_demo_course',
datetime.datetime(2014, 6, 27, 16, 2, 38), 'verified', 1, 'Pass', 1, datetime.datetime(2014, 6, 27, 16, 2, 38), 'verified', 1, 'Pass', 1,
datetime.datetime(2017, 5, 9, 16, 27, 35), 'harry', 1, 'All about acceptance testing!', datetime.datetime(2017, 5, 9, 16, 27, 35), 'harry', 1, 'All about acceptance testing!',
datetime.datetime(2016, 9, 1, 0, 0), datetime.datetime(2016, 12, 1, 0, 0), 'instructor_paced', '13', 2, 4, datetime.datetime(2016, 9, 1, 0, 0), datetime.datetime(2016, 12, 1, 0, 0), 'instructor_paced', '13', 2, 4,
datetime.datetime(2015, 2, 12, 23, 14, 35), 'test@example.com', 'test_user', 'edX+Open_DemoX', datetime.datetime(2015, 2, 12, 23, 14, 35), 'test@example.com', 'test_user', 'edX+Open_DemoX',
'US', None, 'Pied Piper Discount', 'RNBL737ZAUJXUM6E', 0.81, 300.00, 156.00], 'US', None, 'Pied Piper Discount', 'PJS4LCU435W6KGBS', None, 0.81, 300.00, 156.00],
['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 15, 4, 'course-v1:edX+Open_DemoX+edx_demo_course2',
datetime.datetime(2016, 3, 22, 20, 56, 9), 'verified', 1, '', 0, None, 'ginny', 1,
'All about acceptance testing!', datetime.datetime(2016, 6, 1, 0, 0), datetime.datetime(2016, 9, 1, 0, 0),
'self_paced', 'Self Paced', 3, 5, datetime.datetime(2015, 2, 12, 23, 14, 35), 'test5@example.com',
'test_user5', 'edX+Open_DemoX', 'US', None, None, None, 'Absolute, 100 (#7)', 0.5, 200.00, 20.00],
['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 15, 4, 'course-v1:edX+Testing102x+1T2017',
datetime.datetime(2016, 3, 22, 21, 8, 8), 'credit', 1, '', 0, None, 'ginny', 1,
'All about acceptance testing Part 3!', datetime.datetime(2016, 12, 1, 0, 0),
datetime.datetime(2017, 2, 1, 0, 0), 'instructor_paced', '9', 2, 5,
datetime.datetime(2015, 2, 12, 23, 14, 35), 'test5@example.com', 'test_user5', 'edX+Testing102',
'US', None, None, None, 'Percentage, 100 (#8)', 0.74, 100.00, 60.00],
['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 15, 4, 'edX/Open_DemoX/edx_demo_course',
datetime.datetime(2014, 6, 27, 16, 2, 38), 'verified', 1, 'Pass', 1,
datetime.datetime(2017, 5, 9, 16, 27, 35), 'ginny', 1, 'All about acceptance testing!',
datetime.datetime(2016, 9, 1, 0, 0), datetime.datetime(2016, 12, 1, 0, 0), 'instructor_paced', '13', 2, 4,
datetime.datetime(2015, 2, 12, 23, 14, 35), 'test5@example.com', 'test_user5', 'edX+Open_DemoX',
'US', None, None, None, 'Percentage, 100 (#6)', 0.85, 300.00, 56.00],
] ]
return [tuple(row) for row in expected] return [tuple(row) for row in expected]
...@@ -121,7 +143,7 @@ class EnterpriseEnrollmentAcceptanceTest(AcceptanceTestCase): ...@@ -121,7 +143,7 @@ class EnterpriseEnrollmentAcceptanceTest(AcceptanceTestCase):
'has_passed', 'passed_timestamp', 'enterprise_sso_uid', 'enterprise_site_id', 'course_title', 'has_passed', 'passed_timestamp', 'enterprise_sso_uid', 'enterprise_site_id', 'course_title',
'course_start', 'course_end', 'course_pacing_type', 'course_duration_weeks', 'course_min_effort', 'course_start', 'course_end', 'course_pacing_type', 'course_duration_weeks', 'course_min_effort',
'course_max_effort', 'user_account_creation_timestamp', 'user_email', 'user_username', 'course_key', 'course_max_effort', 'user_account_creation_timestamp', 'user_email', 'user_username', 'course_key',
'user_country_code', 'last_activity_date', 'coupon_name', 'coupon_code', 'final_grade', 'user_country_code', 'last_activity_date', 'coupon_name', 'coupon_code', 'offer', 'current_grade',
'course_price', 'discount_price'] 'course_price', 'discount_price']
with self.export_db.cursor() as cursor: with self.export_db.cursor() as cursor:
cursor.execute( cursor.execute(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment