Commit | Line | Data |
---|---|---|
cdfce7c2 TM |
1 | -- MySQL dump 10.11 |
2 | -- | |
3 | -- Host: localhost Database: sklad | |
4 | -- ------------------------------------------------------ | |
5 | -- Server version 5.0.51a-24+lenny5 | |
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 utf8 */; | |
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 | -- Table structure for table `category` | |
20 | -- | |
21 | ||
22 | DROP TABLE IF EXISTS `category`; | |
23 | SET @saved_cs_client = @@character_set_client; | |
24 | SET character_set_client = utf8; | |
25 | CREATE TABLE `category` ( | |
26 | `category_id` int(11) NOT NULL auto_increment, | |
27 | `category_name` varchar(64) collate utf8_czech_ci NOT NULL, | |
28 | PRIMARY KEY (`category_id`), | |
29 | UNIQUE KEY `category_name` (`category_name`) | |
0835e907 | 30 | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; |
cdfce7c2 TM |
31 | SET character_set_client = @saved_cs_client; |
32 | ||
33 | -- | |
34 | -- Dumping data for table `category` | |
35 | -- | |
36 | ||
37 | LOCK TABLES `category` WRITE; | |
38 | /*!40000 ALTER TABLE `category` DISABLE KEYS */; | |
39 | INSERT INTO `category` VALUES (1,'picovinky'),(2,'Tezka technika, Traktory, etc..'); | |
40 | /*!40000 ALTER TABLE `category` ENABLE KEYS */; | |
41 | UNLOCK TABLES; | |
42 | ||
382324d3 TM |
43 | -- |
44 | -- Table structure for table `group` | |
45 | -- | |
46 | ||
47 | DROP TABLE IF EXISTS `group`; | |
48 | SET @saved_cs_client = @@character_set_client; | |
49 | SET character_set_client = utf8; | |
50 | CREATE TABLE `group` ( | |
51 | `group_id` int(11) NOT NULL auto_increment, | |
52 | `group_key` char(23) collate utf8_czech_ci NOT NULL, | |
53 | `group_value` char(23) collate utf8_czech_ci NOT NULL, | |
54 | PRIMARY KEY (`group_id`,`group_key`) | |
55 | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; | |
56 | SET character_set_client = @saved_cs_client; | |
57 | ||
58 | -- | |
59 | -- Dumping data for table `group` | |
60 | -- | |
61 | ||
62 | LOCK TABLES `group` WRITE; | |
63 | /*!40000 ALTER TABLE `group` DISABLE KEYS */; | |
64 | INSERT INTO `group` VALUES (0,'default','rw'),(0,'name','admin'),(2,'name','employee'); | |
65 | /*!40000 ALTER TABLE `group` ENABLE KEYS */; | |
66 | UNLOCK TABLES; | |
67 | ||
cdfce7c2 TM |
68 | -- |
69 | -- Table structure for table `item` | |
70 | -- | |
71 | ||
72 | DROP TABLE IF EXISTS `item`; | |
73 | SET @saved_cs_client = @@character_set_client; | |
74 | SET character_set_client = utf8; | |
75 | CREATE TABLE `item` ( | |
76 | `item_id` int(11) NOT NULL auto_increment, | |
77 | `model_id` int(11) NOT NULL, | |
78 | `vendor_id` int(11) NOT NULL, | |
79 | `item_serial` varchar(128) collate utf8_czech_ci NOT NULL, | |
b4dcae05 | 80 | `item_quantity` int(11) NOT NULL default '1', |
b66fadbb TM |
81 | `room_id` int(11) NOT NULL default '1', |
82 | `status_id` int(11) NOT NULL default '1', | |
cdfce7c2 TM |
83 | `item_price_in` decimal(9,2) NOT NULL default '0.00', |
84 | `item_price_out` decimal(9,2) default NULL, | |
b895e8ea | 85 | `item_customer` int(11) default NULL, |
95548bc4 | 86 | `item_note` varchar(512) collate utf8_czech_ci default NULL, |
b4dcae05 | 87 | `item_author` int(11) NOT NULL, |
b66fadbb | 88 | `item_valid_till` timestamp NOT NULL default '0000-00-00 00:00:00', |
b4dcae05 | 89 | `item_valid_from` timestamp NULL default CURRENT_TIMESTAMP, |
b66fadbb | 90 | PRIMARY KEY (`item_id`,`item_valid_till`), |
b4dcae05 | 91 | UNIQUE KEY `item_serial_item_valid_till` (`item_serial`,`item_valid_till`), |
0835e907 TM |
92 | KEY `vendor_id` (`vendor_id`), |
93 | KEY `model_id` (`model_id`), | |
94 | KEY `status_id` (`status_id`), | |
95 | KEY `room_id` (`room_id`), | |
96 | CONSTRAINT `item_ibfk_6` FOREIGN KEY (`vendor_id`) REFERENCES `vendor` (`vendor_id`), | |
97 | CONSTRAINT `item_ibfk_7` FOREIGN KEY (`model_id`) REFERENCES `model` (`model_id`), | |
98 | CONSTRAINT `item_ibfk_8` FOREIGN KEY (`status_id`) REFERENCES `status` (`status_id`), | |
99 | CONSTRAINT `item_ibfk_9` FOREIGN KEY (`room_id`) REFERENCES `room` (`room_id`) | |
aeed9d10 | 100 | ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; |
cdfce7c2 TM |
101 | SET character_set_client = @saved_cs_client; |
102 | ||
103 | -- | |
104 | -- Dumping data for table `item` | |
105 | -- | |
106 | ||
107 | LOCK TABLES `item` WRITE; | |
108 | /*!40000 ALTER TABLE `item` DISABLE KEYS */; | |
aeed9d10 | 109 | INSERT INTO `item` VALUES (25,1,1,'sdaTEST3',1,1,3,'23.00','23.00',0,'',23,'0000-00-00 00:00:00','2011-08-25 21:19:26'),(25,1,1,'sdaTEST3',3,1,3,'0.00','0.00',NULL,NULL,23,'2011-08-20 00:13:26','2011-08-06 03:07:37'),(25,1,1,'sdaTEST3',3,1,3,'23.00','0.00',0,'',23,'2011-08-25 21:16:17','2011-08-20 00:13:26'),(25,1,1,'sdaTEST3',1,1,3,'23.00','0.00',0,'',23,'2011-08-25 21:19:26','2011-08-25 21:16:18'),(26,2,1,'ABC123',1,1,3,'555.00','777.00',0,'',23,'0000-00-00 00:00:00','2011-08-25 21:19:01'),(26,2,1,'ABC123',900,1,3,'0.00','0.00',NULL,NULL,23,'2011-08-25 21:16:27','2011-08-08 03:57:55'),(26,2,1,'ABC123',1,1,3,'0.00','0.00',0,'',23,'2011-08-25 21:19:01','2011-08-25 21:16:27'),(27,2,1,'deleteme8',1,1,1,'500.00','700.00',0,'',23,'0000-00-00 00:00:00','2011-08-25 21:18:44'),(27,2,1,'deleteme',900,1,3,'0.00','0.00',NULL,NULL,23,'2011-08-09 00:01:10','2011-08-09 00:01:10'),(27,2,1,'deleteme2',900,1,3,'0.00','0.00',NULL,NULL,23,'2011-08-09 00:01:23','2011-08-09 00:01:23'),(27,2,1,'deleteme3',900,1,3,'0.00','0.00',NULL,NULL,23,'2011-08-09 00:02:04','2011-08-09 00:02:04'),(27,2,1,'deleteme4',900,1,3,'0.00','0.00',NULL,NULL,23,'2011-08-09 00:26:07','2011-08-09 00:02:04'),(27,2,1,'deleteme5',900,1,3,'0.00','0.00',NULL,NULL,23,'2011-08-09 00:29:09','2011-08-09 00:26:07'),(27,2,1,'deleteme6',900,1,3,'0.00','0.00',NULL,NULL,23,'2011-08-09 00:31:04','2011-08-09 00:29:09'),(27,2,1,'deleteme7',900,1,3,'0.00','0.00',NULL,NULL,23,'2011-08-09 00:31:50','2011-08-09 00:31:04'),(27,2,1,'deleteme8',900,1,3,'0.00','0.00',NULL,NULL,23,'2011-08-09 01:39:17','2011-08-09 00:31:50'),(27,3,1,'deleteme8',0,1,1,'0.00','0.00',NULL,NULL,23,'2011-08-09 01:51:13','2011-08-09 01:40:07'),(27,2,1,'deleteme8',0,1,1,'0.00','0.00',NULL,NULL,23,'2011-08-09 01:51:43','2011-08-09 01:51:13'),(27,2,1,'deleteme8',900,1,1,'0.00','0.00',NULL,NULL,23,'2011-08-25 21:16:34','2011-08-09 01:51:43'),(27,2,1,'deleteme8',1,1,1,'0.00','0.00',0,'',23,'2011-08-25 21:18:44','2011-08-25 21:16:35'),(31,2,1,'seriáál',1,1,1,'600.00','666.00',0,'',23,'0000-00-00 00:00:00','2011-08-25 21:18:16'),(31,2,1,'seriáál',1,1,1,'0.00','0.00',NULL,NULL,23,'2011-08-25 21:18:16','2011-08-09 02:36:26'),(33,3,1,'KG23',12,1,1,'84.00','108.00',0,'',23,'0000-00-00 00:00:00','2011-08-25 21:02:45'),(33,3,1,'KG23',24,1,1,'0.00','666.00',0,'',23,'2011-08-25 16:25:04','2011-08-25 15:50:08'),(33,3,1,'KG23',24,1,1,'168.00','216.00',0,'',23,'2011-08-25 20:44:44','2011-08-25 16:25:04'),(33,3,1,'KG23',23,1,1,'161.00','207.00',0,'',23,'2011-08-25 20:46:45','2011-08-25 20:44:44'),(33,3,1,'KG23',13,1,1,'91.00','117.00',0,'',23,'2011-08-25 21:02:45','2011-08-25 20:46:45'),(35,3,1,'KG23@@1314305191',10,1,2,'70.00','90.00',0,'nekde',23,'0000-00-00 00:00:00','2011-08-25 20:46:45'),(36,3,1,'KG23@0@1314306128',1,1,2,'7.00','9.00',0,'kgdisp',23,'0000-00-00 00:00:00','2011-08-25 21:02:45'); |
cdfce7c2 TM |
110 | /*!40000 ALTER TABLE `item` ENABLE KEYS */; |
111 | UNLOCK TABLES; | |
112 | ||
113 | -- | |
114 | -- Table structure for table `model` | |
115 | -- | |
116 | ||
117 | DROP TABLE IF EXISTS `model`; | |
118 | SET @saved_cs_client = @@character_set_client; | |
119 | SET character_set_client = utf8; | |
120 | CREATE TABLE `model` ( | |
121 | `model_id` int(11) NOT NULL auto_increment, | |
122 | `model_name` varchar(64) collate utf8_czech_ci NOT NULL, | |
123 | `producer_id` int(11) NOT NULL default '0', | |
124 | `category_id` int(11) NOT NULL default '0', | |
125 | `model_barcode` varchar(128) collate utf8_czech_ci NOT NULL, | |
aeed9d10 TM |
126 | `model_countable` int(1) NOT NULL default '1', |
127 | `model_price_in` decimal(9,2) default NULL, | |
cdfce7c2 TM |
128 | `model_price_out` decimal(9,2) default NULL, |
129 | `model_descript` varchar(1024) collate utf8_czech_ci NOT NULL, | |
130 | PRIMARY KEY (`model_id`), | |
0835e907 TM |
131 | UNIQUE KEY `model_barcode` (`model_barcode`), |
132 | KEY `category_id` (`category_id`), | |
133 | KEY `producer_id` (`producer_id`), | |
134 | CONSTRAINT `model_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`), | |
135 | CONSTRAINT `model_ibfk_2` FOREIGN KEY (`producer_id`) REFERENCES `producer` (`producer_id`) | |
aeed9d10 | 136 | ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; |
cdfce7c2 TM |
137 | SET character_set_client = @saved_cs_client; |
138 | ||
139 | -- | |
140 | -- Dumping data for table `model` | |
141 | -- | |
142 | ||
143 | LOCK TABLES `model` WRITE; | |
144 | /*!40000 ALTER TABLE `model` DISABLE KEYS */; | |
aeed9d10 | 145 | INSERT INTO `model` VALUES (1,'Rushkoff: Klub extáze',1,1,'9788086096599',1,'13.00','23.00','prvni vec s carovym kodem co sem videl'),(2,'Bitevní tank',1,2,'BT23',1,'42.00','42.23','autoradio v cene'),(3,'Karel Gott - kompletní diskografie',2,2,'KG23',0,'7.00','9.00','možno použít i k sebeobranným účelům'); |
cdfce7c2 TM |
146 | /*!40000 ALTER TABLE `model` ENABLE KEYS */; |
147 | UNLOCK TABLES; | |
148 | ||
149 | -- | |
150 | -- Table structure for table `producer` | |
151 | -- | |
152 | ||
153 | DROP TABLE IF EXISTS `producer`; | |
154 | SET @saved_cs_client = @@character_set_client; | |
155 | SET character_set_client = utf8; | |
156 | CREATE TABLE `producer` ( | |
157 | `producer_id` int(11) NOT NULL auto_increment, | |
158 | `producer_name` varchar(64) collate utf8_czech_ci NOT NULL, | |
159 | `producer_note` varchar(512) collate utf8_czech_ci NOT NULL, | |
160 | PRIMARY KEY (`producer_id`), | |
161 | UNIQUE KEY `producer_name` (`producer_name`) | |
0835e907 | 162 | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; |
cdfce7c2 TM |
163 | SET character_set_client = @saved_cs_client; |
164 | ||
165 | -- | |
166 | -- Dumping data for table `producer` | |
167 | -- | |
168 | ||
169 | LOCK TABLES `producer` WRITE; | |
170 | /*!40000 ALTER TABLE `producer` DISABLE KEYS */; | |
171 | INSERT INTO `producer` VALUES (1,'C.C.M.E','Czech Company Making Everything'),(2,'AchAchne Labz','Ach ne'); | |
172 | /*!40000 ALTER TABLE `producer` ENABLE KEYS */; | |
173 | UNLOCK TABLES; | |
174 | ||
cdfce7c2 TM |
175 | -- |
176 | -- Table structure for table `room` | |
177 | -- | |
178 | ||
179 | DROP TABLE IF EXISTS `room`; | |
180 | SET @saved_cs_client = @@character_set_client; | |
181 | SET character_set_client = utf8; | |
182 | CREATE TABLE `room` ( | |
183 | `room_id` int(11) NOT NULL auto_increment, | |
184 | `room_name` varchar(64) collate utf8_czech_ci NOT NULL, | |
326a9fc9 | 185 | `room_author` int(11) NOT NULL default '0', |
cdfce7c2 TM |
186 | `room_descript` text collate utf8_czech_ci NOT NULL, |
187 | PRIMARY KEY (`room_id`), | |
0835e907 | 188 | UNIQUE KEY `room_name` (`room_name`), |
326a9fc9 | 189 | KEY `user_id` (`room_author`) |
0835e907 | 190 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; |
cdfce7c2 TM |
191 | SET character_set_client = @saved_cs_client; |
192 | ||
193 | -- | |
194 | -- Dumping data for table `room` | |
195 | -- | |
196 | ||
197 | LOCK TABLES `room` WRITE; | |
198 | /*!40000 ALTER TABLE `room` DISABLE KEYS */; | |
199 | INSERT INTO `room` VALUES (1,'BarvyLaky',0,'LakyBarvy'); | |
200 | /*!40000 ALTER TABLE `room` ENABLE KEYS */; | |
201 | UNLOCK TABLES; | |
202 | ||
203 | -- | |
204 | -- Table structure for table `status` | |
205 | -- | |
206 | ||
207 | DROP TABLE IF EXISTS `status`; | |
208 | SET @saved_cs_client = @@character_set_client; | |
209 | SET character_set_client = utf8; | |
210 | CREATE TABLE `status` ( | |
211 | `status_id` int(11) NOT NULL auto_increment, | |
212 | `status_name` varchar(16) collate utf8_czech_ci NOT NULL, | |
213 | PRIMARY KEY (`status_id`), | |
214 | UNIQUE KEY `status_name` (`status_name`) | |
b66fadbb | 215 | ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; |
cdfce7c2 TM |
216 | SET character_set_client = @saved_cs_client; |
217 | ||
218 | -- | |
219 | -- Dumping data for table `status` | |
220 | -- | |
221 | ||
222 | LOCK TABLES `status` WRITE; | |
223 | /*!40000 ALTER TABLE `status` DISABLE KEYS */; | |
bda4a4be | 224 | INSERT INTO `status` VALUES (0,'deleted'),(4,'destroyed'),(2,'placed'),(3,'saled'),(1,'stored'); |
cdfce7c2 TM |
225 | /*!40000 ALTER TABLE `status` ENABLE KEYS */; |
226 | UNLOCK TABLES; | |
227 | ||
0835e907 TM |
228 | -- |
229 | -- Table structure for table `user` | |
230 | -- | |
231 | ||
232 | DROP TABLE IF EXISTS `user`; | |
233 | SET @saved_cs_client = @@character_set_client; | |
234 | SET character_set_client = utf8; | |
235 | CREATE TABLE `user` ( | |
236 | `user_id` int(11) NOT NULL default '0', | |
237 | `user_permit` enum('user','admin') collate utf8_czech_ci NOT NULL default 'user', | |
b4dcae05 | 238 | PRIMARY KEY (`user_id`) |
0835e907 TM |
239 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; |
240 | SET character_set_client = @saved_cs_client; | |
241 | ||
242 | -- | |
243 | -- Dumping data for table `user` | |
244 | -- | |
245 | ||
246 | LOCK TABLES `user` WRITE; | |
247 | /*!40000 ALTER TABLE `user` DISABLE KEYS */; | |
248 | /*!40000 ALTER TABLE `user` ENABLE KEYS */; | |
249 | UNLOCK TABLES; | |
250 | ||
cdfce7c2 TM |
251 | -- |
252 | -- Table structure for table `vendor` | |
253 | -- | |
254 | ||
255 | DROP TABLE IF EXISTS `vendor`; | |
256 | SET @saved_cs_client = @@character_set_client; | |
257 | SET character_set_client = utf8; | |
258 | CREATE TABLE `vendor` ( | |
259 | `vendor_id` int(11) NOT NULL auto_increment, | |
260 | `vendor_name` varchar(64) collate utf8_czech_ci NOT NULL, | |
261 | `vendor_note` varchar(256) collate utf8_czech_ci NOT NULL, | |
262 | PRIMARY KEY (`vendor_id`), | |
263 | UNIQUE KEY `vendor_name` (`vendor_name`) | |
0835e907 | 264 | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; |
cdfce7c2 TM |
265 | SET character_set_client = @saved_cs_client; |
266 | ||
267 | -- | |
268 | -- Dumping data for table `vendor` | |
269 | -- | |
270 | ||
271 | LOCK TABLES `vendor` WRITE; | |
272 | /*!40000 ALTER TABLE `vendor` DISABLE KEYS */; | |
273 | INSERT INTO `vendor` VALUES (1,'C.C.S.E','Czech Company Selling Everything'),(2,'Trolo Cybernetix','trololo'); | |
274 | /*!40000 ALTER TABLE `vendor` ENABLE KEYS */; | |
275 | UNLOCK TABLES; | |
276 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; | |
277 | ||
278 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; | |
279 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; | |
280 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; | |
281 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | |
282 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | |
283 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; | |
284 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; | |
285 | ||
382324d3 | 286 | -- Dump completed on 2011-09-23 15:16:52 |