· 8 years ago · Jul 13, 2018, 06:34 PM
1CREATE TABLE IF NOT EXISTS `subscriptions` (
2 `subscription_id` int(10) unsigned NOT NULL auto_increment,
3 `udid` varchar(255) NOT NULL,
4 `bundle_id` varchar(255) NOT NULL,
5 `country_code` varchar(5) NOT NULL,
6 `language` varchar(15) NOT NULL,
7 `devicename` varchar(100) NOT NULL,
8 `os_version` varchar(50) NOT NULL,
9 `created` datetime NOT NULL,
10 `modified` datetime NOT NULL,
11 `expire` datetime NOT NULL,
12 PRIMARY KEY (`subscription_id`)
13) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
14
15CREATE TABLE IF NOT EXISTS `transactions` (
16 `transaction_id` int(10) unsigned NOT NULL,
17 `subscription_id` int(10) unsigned NOT NULL,
18 `item_id` int(10) unsigned NOT NULL,
19 `original_transaction_id` int(10) unsigned NOT NULL,
20 `bvrs` varchar(100) NOT NULL,
21 `product_id` varchar(255) NOT NULL,
22 `purchase_date` datetime NOT NULL,
23 `quantity` int(10) unsigned NOT NULL,
24 `bid` varchar(255) NOT NULL,
25 `original_purchase_date` datetime NOT NULL,
26 `signature` text NOT NULL,
27 `purchase_info` text NOT NULL,
28 `pod` varchar(100) NOT NULL,
29 `signing_status` int NOT NULL,
30 `created` datetime NOT NULL,
31 KEY (`transaction_id`)
32) ENGINE=MyISAM DEFAULT CHARSET=latin1;