· 5 years ago · Apr 14, 2020, 06:42 AM
1-- MySQL dump 10.17 Distrib 10.3.12-MariaDB, for Win64 (AMD64)
2--
3-- Host: localhost Database: test
4-- ------------------------------------------------------
5-- Server version 10.3.12-MariaDB
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8mb4 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Current Database: `test`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET tis620 */;
23
24USE `test`;
25
26--
27-- Table structure for table `invdetail`
28--
29
30DROP TABLE IF EXISTS `invdetail`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32/*!40101 SET character_set_client = utf8 */;
33CREATE TABLE `invdetail` (
34 `detailid` int(11) NOT NULL AUTO_INCREMENT,
35 `fk_invnum` int(11) DEFAULT NULL,
36 `productid` varchar(20) DEFAULT NULL,
37 `saleprice` double DEFAULT NULL,
38 `quantity` double DEFAULT NULL,
39 `itemremark` varchar(255) DEFAULT NULL,
40 PRIMARY KEY (`detailid`),
41 KEY `FK_INVNO` (`fk_invnum`),
42 CONSTRAINT `FK_INVNO` FOREIGN KEY (`fk_invnum`) REFERENCES `invheader` (`invid`)
43) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=tis620;
44/*!40101 SET character_set_client = @saved_cs_client */;
45
46--
47-- Dumping data for table `invdetail`
48--
49
50LOCK TABLES `invdetail` WRITE;
51/*!40000 ALTER TABLE `invdetail` DISABLE KEYS */;
52INSERT INTO `invdetail` VALUES (1,1,'M001',20,300,NULL),(2,1,'M002',30,50,NULL),(3,2,'M003',40,30,NULL),(4,2,'M002',30,90,NULL),(5,3,'M001',20,250,NULL),(6,3,'M002',30,50,NULL),(7,3,'M002',30,50,NULL),(8,3,'M001',20,250,NULL),(9,4,'M002',30,60,NULL),(10,4,'M002',30,80,NULL);
53/*!40000 ALTER TABLE `invdetail` ENABLE KEYS */;
54UNLOCK TABLES;
55
56--
57-- Table structure for table `invheader`
58--
59
60DROP TABLE IF EXISTS `invheader`;
61/*!40101 SET @saved_cs_client = @@character_set_client */;
62/*!40101 SET character_set_client = utf8 */;
63CREATE TABLE `invheader` (
64 `invid` int(11) NOT NULL AUTO_INCREMENT,
65 `invdate` datetime DEFAULT NULL,
66 `invoicestatus` varchar(20) DEFAULT NULL,
67 PRIMARY KEY (`invid`)
68) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=tis620;
69/*!40101 SET character_set_client = @saved_cs_client */;
70
71--
72-- Dumping data for table `invheader`
73--
74
75LOCK TABLES `invheader` WRITE;
76/*!40000 ALTER TABLE `invheader` DISABLE KEYS */;
77INSERT INTO `invheader` VALUES (1,'2019-12-30 00:00:00','Submit'),(2,'2019-12-24 00:00:00','Draft'),(3,'2019-11-20 00:00:00','Draft'),(4,'2019-11-21 00:00:00','Draft'),(5,'2019-11-23 00:00:00','Draft');
78/*!40000 ALTER TABLE `invheader` ENABLE KEYS */;
79UNLOCK TABLES;
80/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
81
82/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
83/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
84/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
85/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
86/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
87/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
88/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
89
90-- Dump completed on 2020-04-14 13:08:38