· 10 years ago · Jun 04, 2016, 08:21 AM
1
2--
3-- Database: `lofo`
4--
5
6-- --------------------------------------------------------
7
8--
9-- Table structure for table `admin`
10--
11
12-- drop TABLE `admin`;
13-- DROP TABLE `users`;
14-- drop TABLE `found`;
15-- drop TABLE `lost`;
16-- DROP TABLE `message`;
17
18
19CREATE TABLE IF NOT EXISTS `admin` (
20`id` int(30) NOT NULL,
21 `username` varchar(30) NOT NULL,
22 `password` varchar(30) NOT NULL
23) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
24
25--
26-- Dumping data for table `admin`
27--
28
29INSERT INTO `admin` (`id`, `username`, `password`) VALUES
30(1, 'admin', 'admin');
31
32-- --------------------------------------------------------
33
34--
35-- Table structure for table `found`
36--
37CREATE TABLE IF NOT EXISTS `found` (
38`id` int(100) NOT NULL,
39 `title` varchar(30) NOT NULL,
40 `foundDate` date NOT NULL,
41 `category` varchar(20) NOT NULL,
42 `subCategory` varchar(20) NOT NULL,
43 `color` varchar(20) NOT NULL,
44 `details` text NOT NULL,
45 `area` varchar(20) NOT NULL,
46 `postedAt` date NOT NULL,
47 `userId` int(10) NOT NULL,
48 `foun` int(2) NOT NULL DEFAULT '1'
49) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
50
51--
52-- Dumping data for table `found`
53--
54
55INSERT INTO `found` (`id`, `title`, `foundDate`, `category`, `subCategory`, `color`, `details`, `area`, `postedAt`, `userId`, `foun`) VALUES
56(1, 'ochelari', '2016-03-05', 'bags', 'suitcase', 'green', 'ochelari de soare', 'Roman', '0000-00-00', 1, 1),
57(2, 'Glasses', '2016-04-01', 'personal', 'glass', 'Red', 'nice ', 'Iasi', '2016-04-04', 2, 1),
58(3, 'carte', '2016-03-11', 'collector', 'card', 'red', 'nice red book', 'Bucuresti', '2016-04-05', 2, 1),
59(4, 'cohelo', '2016-02-19', 'jewelry', 'necklace', 'blue', 'blue jewelry', 'Bucuresti', '2016-04-05', 2, 1);
60
61-- --------------------------------------------------------
62
63--
64-- Table structure for table `lost`
65--
66CREATE TABLE IF NOT EXISTS `lost` (
67`id` int(11) NOT NULL,
68 `title` varchar(20) NOT NULL,
69 `lastTimeSeen` date NOT NULL,
70 `category` varchar(20) NOT NULL,
71 `subCategory` varchar(20) NOT NULL,
72 `color` varchar(20) NOT NULL,
73 `details` text NOT NULL,
74 `area` varchar(20) NOT NULL,
75 `postedAt` date NOT NULL,
76 `userId` int(10) NOT NULL,
77 `los` int(2) NOT NULL DEFAULT '0'
78) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
79
80--
81-- Dumping data for table `lost`
82--
83
84INSERT INTO `lost` (`id`, `title`, `lastTimeSeen`, `category`, `subCategory`, `color`, `details`, `area`, `postedAt`, `userId`, `los`) VALUES
85(1, 'ion', '2016-03-03', 'bags', 'briefcase', 'red', 'nu iti zic', 'Romania', '0000-00-00', 2, 0),
86(2, 'ceva', '2016-03-08', 'currency', 'foreign', 'Nur', ' CEva', 'Iasi', '0000-00-00', 2, 0);
87
88-- --------------------------------------------------------
89
90--
91-- Table structure for table `message`
92--
93
94
95CREATE TABLE IF NOT EXISTS `message` (
96`id` int(11) NOT NULL,
97 `username1` varchar(30) NOT NULL,
98 `username2` varchar(30) NOT NULL,
99 `title` varchar(30) NOT NULL,
100 `body` text NOT NULL,
101 `seen` varchar(3) NOT NULL DEFAULT 'no',
102 `sentAt` date NOT NULL
103) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
104
105--
106-- Dumping data for table `message`
107--
108
109INSERT INTO `message` (`id`, `username1`, `username2`, `title`, `body`, `seen`, `sentAt`) VALUES
110(1, 'bb', 'alex', 'boss', 'ce faci?:)', 'yes', '2016-04-09'),
111(2, 'bb', 'alex', 'cd', 'cddse', 'yes', '2016-04-09'),
112(3, 'bb', 'alex', 'msg2', 'ce faci', 'yes', '2016-04-09'),
113(4, 'cc', 'alex', 'ceva', 'boss esti okfea daed amedieam fiaef iamfaei fnaefn aejfnaj fnaejifneaijfnaeifjna fjanfkjaenfjaenfkaje neakjfn aekjfankfjanefk jae', 'yes', '2016-04-09'),
114(5, 'cc', 'bb', 'ce', 'daewdd', 'no', '2016-04-09'),
115(6, 'cc', 'bb', 'de', 'jh uh iu hkiy hky bg yb ky bky b kyb ky byb yb ky b ky bkybky bky bkyb ky', 'no', '2016-04-09'),
116(7, 'alex', 'blitz08', 'hello', 'ce faci boss', 'yes', '2016-05-03');
117
118-- --------------------------------------------------------
119
120--
121-- Table structure for table `users`
122
123
124CREATE TABLE IF NOT EXISTS `users` (
125`id` int(10) NOT NULL,
126 `firstName` varchar(20) NOT NULL,
127 `lastName` varchar(20) NOT NULL,
128 `username` varchar(20) NOT NULL,
129 `email` varchar(30) NOT NULL,
130 `password` varchar(30) NOT NULL,
131 `city` varchar(20) NOT NULL,
132 `address` text NOT NULL,
133 `country` varchar(20) NOT NULL,
134 `singup` date NOT NULL,
135 `salt` varchar(20) --default value
136) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
137
138--
139-- Dumping data for table `users`
140--
141
142INSERT INTO `users` (`id`, `firstName`, `lastName`, `username`, `email`, `password`, `city`, `address`, `country`, `singup`) VALUES
143(1, 'Dumea', 'Alexandru', 'blitz08', 'alex_blitz08@yahoo.com', 'steaua', '', 'conductelor 6', 'Romania', '2016-03-08'),
144(2, 'Danca', 'Alex', 'alex', 'alex.dumea@gmail.com', 'steaua', 'Iasi', 'ceva frumos', 'Romania', '2016-03-08'),
145(3, 'Lebada', 'Ciprian', 'lebada', 'lebada@yahoo.com', 'lebada', '', 'Roman strada Lebada', 'Romania', '2016-03-24'),
146(4, 'aa', 'aa', 'aa', 'alex@gmail.com', 'aa', '', 'aa', 'Germania', '2016-04-04'),
147(5, 'bb', 'bb', 'bb', 'bb@gmail.com', 'bb', '', 'bb', 'Romania', '2016-04-04'),
148(6, 'cc', 'cc', 'cc', 'cc@gmail.com', 'cc', 'cc', 'cc', 'Germania', '2016-04-04');
149
150--
151-- Indexes for dumped tables
152--
153
154--
155-- Indexes for table `admin`
156--
157ALTER TABLE `admin`
158 ADD PRIMARY KEY (`id`);
159
160--
161-- Indexes for table `found`
162--
163ALTER TABLE `found`
164 ADD PRIMARY KEY (`id`);
165
166--
167-- Indexes for table `lost`
168--
169ALTER TABLE `lost`
170 ADD PRIMARY KEY (`id`);
171
172--
173-- Indexes for table `message`
174--
175ALTER TABLE `message`
176 ADD PRIMARY KEY (`id`);
177
178--
179-- Indexes for table `users`
180--
181ALTER TABLE `users`
182 ADD PRIMARY KEY (`id`);
183
184--
185-- AUTO_INCREMENT for dumped tables
186--
187
188--
189-- AUTO_INCREMENT for table `admin`
190--
191ALTER TABLE `admin`
192MODIFY `id` int(30) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
193--
194-- AUTO_INCREMENT for table `found`
195--
196ALTER TABLE `found`
197MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
198--
199-- AUTO_INCREMENT for table `lost`
200--
201ALTER TABLE `lost`
202MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
203--
204-- AUTO_INCREMENT for table `message`
205--
206ALTER TABLE `message`
207MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8;
208--
209-- AUTO_INCREMENT for table `users`
210--
211ALTER TABLE `users`
212MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;