· 10 years ago · Aug 22, 2016, 09:18 PM
1-- receipt raw sql dump
2
3CREATE DATABASE IF NOT EXISTS nwss_client;
4
5CREATE TABLE IF NOT EXISTS `receipt_raw` (
6 `receipt_raw_id` int(11) NOT NULL AUTO_INCREMENT,
7 `pos_id` int(11) DEFAULT NULL,
8 `location_id` int(11) DEFAULT NULL,
9 `data` text NOT NULL,
10 `remote_host` varchar(500) DEFAULT NULL,
11 `remote_port` int(11) DEFAULT NULL,
12 `usbport` varchar(10) DEFAULT NULL,
13 `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
14 `entry_type` enum('IN_PROCESS','PAID') DEFAULT NULL,
15 `processed` int(11) DEFAULT '0',
16 PRIMARY KEY (`receipt_raw_id`)
17) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
18
19-- This is for the case where the table exists but has not had this
20-- column added yet. If receipt_raw already has the column usbport,
21-- this will error out. That's okay.
22ALTER TABLE receipt_raw ADD COLUMN usbport char(5) DEFAULT NULL;