Migrated from SVN to GIT (history was containing passwords, so i didn't converted it)
[mirrors/SokoMan.git] / install.sql
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`)
30 ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
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
43 --
44 -- Table structure for table `item`
45 --
46
47 DROP TABLE IF EXISTS `item`;
48 SET @saved_cs_client = @@character_set_client;
49 SET character_set_client = utf8;
50 CREATE TABLE `item` (
51 `item_id` int(11) NOT NULL auto_increment,
52 `model_id` int(11) NOT NULL,
53 `vendor_id` int(11) NOT NULL,
54 `item_serial` varchar(128) collate utf8_czech_ci NOT NULL,
55 `item_quantity` int(11) default NULL,
56 `room_id` int(11) NOT NULL default '0',
57 `status_id` int(11) NOT NULL default '0',
58 `item_price_in` decimal(9,2) NOT NULL default '0.00',
59 `item_price_out` decimal(9,2) default NULL,
60 PRIMARY KEY (`item_id`),
61 UNIQUE KEY `item_serial` (`item_serial`)
62 ) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
63 SET character_set_client = @saved_cs_client;
64
65 --
66 -- Dumping data for table `item`
67 --
68
69 LOCK TABLES `item` WRITE;
70 /*!40000 ALTER TABLE `item` DISABLE KEYS */;
71 INSERT INTO `item` VALUES (1,1,1,'JGFHGA343',NULL,1,1,'13.00',NULL),(2,1,1,'OMG42',NULL,1,1,'7.00','25.00'),(3,2,0,'aaa232',NULL,0,0,'0.00',NULL),(9,3,2,'SATAN',0,1,1,'0.10','0.00'),(20,3,1,'editmeeeee',23,1,1,'0.00','0.00');
72 /*!40000 ALTER TABLE `item` ENABLE KEYS */;
73 UNLOCK TABLES;
74
75 --
76 -- Table structure for table `model`
77 --
78
79 DROP TABLE IF EXISTS `model`;
80 SET @saved_cs_client = @@character_set_client;
81 SET character_set_client = utf8;
82 CREATE TABLE `model` (
83 `model_id` int(11) NOT NULL auto_increment,
84 `model_name` varchar(64) collate utf8_czech_ci NOT NULL,
85 `producer_id` int(11) NOT NULL default '0',
86 `category_id` int(11) NOT NULL default '0',
87 `model_barcode` varchar(128) collate utf8_czech_ci NOT NULL,
88 `model_price_out` decimal(9,2) default NULL,
89 `model_descript` varchar(1024) collate utf8_czech_ci NOT NULL,
90 PRIMARY KEY (`model_id`),
91 UNIQUE KEY `model_barcode` (`model_barcode`)
92 ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
93 SET character_set_client = @saved_cs_client;
94
95 --
96 -- Dumping data for table `model`
97 --
98
99 LOCK TABLES `model` WRITE;
100 /*!40000 ALTER TABLE `model` DISABLE KEYS */;
101 INSERT INTO `model` VALUES (1,'Rushkoff: Klub extáze',0,0,'9788086096599','23.00','prvni vec s carovym kodem co sem videl'),(2,'Rama MultiVita',1,1,'8593838925918','15.00','oblibeny ropny produkt'),(3,'Karel Gott - kompletní diskografie',2,2,'4792207502505','666.00','možno použít i k sebeobraně');
102 /*!40000 ALTER TABLE `model` ENABLE KEYS */;
103 UNLOCK TABLES;
104
105 --
106 -- Table structure for table `producer`
107 --
108
109 DROP TABLE IF EXISTS `producer`;
110 SET @saved_cs_client = @@character_set_client;
111 SET character_set_client = utf8;
112 CREATE TABLE `producer` (
113 `producer_id` int(11) NOT NULL auto_increment,
114 `producer_name` varchar(64) collate utf8_czech_ci NOT NULL,
115 `producer_note` varchar(512) collate utf8_czech_ci NOT NULL,
116 PRIMARY KEY (`producer_id`),
117 UNIQUE KEY `producer_name` (`producer_name`)
118 ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
119 SET character_set_client = @saved_cs_client;
120
121 --
122 -- Dumping data for table `producer`
123 --
124
125 LOCK TABLES `producer` WRITE;
126 /*!40000 ALTER TABLE `producer` DISABLE KEYS */;
127 INSERT INTO `producer` VALUES (1,'C.C.M.E','Czech Company Making Everything'),(2,'AchAchne Labz','Ach ne');
128 /*!40000 ALTER TABLE `producer` ENABLE KEYS */;
129 UNLOCK TABLES;
130
131 --
132 -- Table structure for table `rights`
133 --
134
135 DROP TABLE IF EXISTS `rights`;
136 SET @saved_cs_client = @@character_set_client;
137 SET character_set_client = utf8;
138 CREATE TABLE `rights` (
139 `user_id` int(11) NOT NULL default '0',
140 `permit` enum('user','admin') collate utf8_czech_ci NOT NULL default 'user',
141 UNIQUE KEY `user_id` (`user_id`)
142 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
143 SET character_set_client = @saved_cs_client;
144
145 --
146 -- Dumping data for table `rights`
147 --
148
149 LOCK TABLES `rights` WRITE;
150 /*!40000 ALTER TABLE `rights` DISABLE KEYS */;
151 /*!40000 ALTER TABLE `rights` ENABLE KEYS */;
152 UNLOCK TABLES;
153
154 --
155 -- Table structure for table `room`
156 --
157
158 DROP TABLE IF EXISTS `room`;
159 SET @saved_cs_client = @@character_set_client;
160 SET character_set_client = utf8;
161 CREATE TABLE `room` (
162 `room_id` int(11) NOT NULL auto_increment,
163 `room_name` varchar(64) collate utf8_czech_ci NOT NULL,
164 `manager_id` int(11) NOT NULL default '0',
165 `room_descript` text collate utf8_czech_ci NOT NULL,
166 PRIMARY KEY (`room_id`),
167 UNIQUE KEY `room_name` (`room_name`)
168 ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
169 SET character_set_client = @saved_cs_client;
170
171 --
172 -- Dumping data for table `room`
173 --
174
175 LOCK TABLES `room` WRITE;
176 /*!40000 ALTER TABLE `room` DISABLE KEYS */;
177 INSERT INTO `room` VALUES (1,'BarvyLaky',0,'LakyBarvy');
178 /*!40000 ALTER TABLE `room` ENABLE KEYS */;
179 UNLOCK TABLES;
180
181 --
182 -- Table structure for table `status`
183 --
184
185 DROP TABLE IF EXISTS `status`;
186 SET @saved_cs_client = @@character_set_client;
187 SET character_set_client = utf8;
188 CREATE TABLE `status` (
189 `status_id` int(11) NOT NULL auto_increment,
190 `status_name` varchar(16) collate utf8_czech_ci NOT NULL,
191 PRIMARY KEY (`status_id`),
192 UNIQUE KEY `status_name` (`status_name`)
193 ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
194 SET character_set_client = @saved_cs_client;
195
196 --
197 -- Dumping data for table `status`
198 --
199
200 LOCK TABLES `status` WRITE;
201 /*!40000 ALTER TABLE `status` DISABLE KEYS */;
202 INSERT INTO `status` VALUES (1,'stored'),(2,'placed'),(3,'saled'),(4,'destroyed');
203 /*!40000 ALTER TABLE `status` ENABLE KEYS */;
204 UNLOCK TABLES;
205
206 --
207 -- Table structure for table `transaction`
208 --
209
210 DROP TABLE IF EXISTS `transaction`;
211 SET @saved_cs_client = @@character_set_client;
212 SET character_set_client = utf8;
213 CREATE TABLE `transaction` (
214 `transaction_id` int(11) NOT NULL auto_increment,
215 `item_id` int(11) NOT NULL default '0',
216 `transaction_time` timestamp NOT NULL default CURRENT_TIMESTAMP,
217 `status_id_in` int(11) NOT NULL default '0',
218 `status_id_out` int(11) NOT NULL default '0',
219 `user_id` int(11) NOT NULL default '0',
220 PRIMARY KEY (`transaction_id`)
221 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
222 SET character_set_client = @saved_cs_client;
223
224 --
225 -- Dumping data for table `transaction`
226 --
227
228 LOCK TABLES `transaction` WRITE;
229 /*!40000 ALTER TABLE `transaction` DISABLE KEYS */;
230 /*!40000 ALTER TABLE `transaction` ENABLE KEYS */;
231 UNLOCK TABLES;
232
233 --
234 -- Table structure for table `vendor`
235 --
236
237 DROP TABLE IF EXISTS `vendor`;
238 SET @saved_cs_client = @@character_set_client;
239 SET character_set_client = utf8;
240 CREATE TABLE `vendor` (
241 `vendor_id` int(11) NOT NULL auto_increment,
242 `vendor_name` varchar(64) collate utf8_czech_ci NOT NULL,
243 `vendor_note` varchar(256) collate utf8_czech_ci NOT NULL,
244 PRIMARY KEY (`vendor_id`),
245 UNIQUE KEY `vendor_name` (`vendor_name`)
246 ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
247 SET character_set_client = @saved_cs_client;
248
249 --
250 -- Dumping data for table `vendor`
251 --
252
253 LOCK TABLES `vendor` WRITE;
254 /*!40000 ALTER TABLE `vendor` DISABLE KEYS */;
255 INSERT INTO `vendor` VALUES (1,'C.C.S.E','Czech Company Selling Everything'),(2,'Trolo Cybernetix','trololo');
256 /*!40000 ALTER TABLE `vendor` ENABLE KEYS */;
257 UNLOCK TABLES;
258 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
259
260 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
261 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
262 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
263 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
264 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
265 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
266 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
267
268 -- Dump completed on 2011-06-12 3:18:45
This page took 0.554487 seconds and 5 git commands to generate.