mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-25 09:38:42 -04:00
Add database foreign keys related to rewards
This commit is contained in:
1 parent
cd792eb56a
commit
6485cf050d
5 files changed
+130
-51
No files matched your search
+8
-3
@@ -117,7 +117,8 @@ CREATE TABLE `ospos_customers` (
|
||||
`points` int(11) DEFAULT NULL,
|
||||
`deleted` int(1) NOT NULL DEFAULT '0',
|
||||
UNIQUE KEY `account_number` (`account_number`),
|
||||
KEY `person_id` (`person_id`)
|
||||
KEY `person_id` (`person_id`),
|
||||
KEY `package_id` (`package_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
@@ -923,7 +924,10 @@ CREATE TABLE IF NOT EXISTS `ospos_customers_points` (
|
||||
`package_id` int(11) NOT NULL,
|
||||
`sale_id` int(11) NOT NULL,
|
||||
`points_earned` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `person_id` (`person_id`),
|
||||
KEY `package_id` (`package_id`),
|
||||
KEY `sale_id` (`sale_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
|
||||
|
||||
|
||||
@@ -938,7 +942,8 @@ CREATE TABLE IF NOT EXISTS `ospos_sales_reward_points` (
|
||||
`sale_id` int(11) NOT NULL,
|
||||
`earned` float NOT NULL,
|
||||
`used` float NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `sale_id` (`sale_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user