initial.sql 80.9 KB
Newer Older
Nick Sellen's avatar
Nick Sellen committed
1
-- phpMyAdmin SQL Dump
Tilmann Becker's avatar
Tilmann Becker committed
2
-- version 4.2.12deb2+deb8u1
Nick Sellen's avatar
Nick Sellen committed
3 4 5
-- http://www.phpmyadmin.net
--
-- Host: localhost
Tilmann Becker's avatar
Tilmann Becker committed
6 7 8
-- Generation Time: Jul 20, 2016 at 12:33 PM
-- Server version: 5.5.49-0+deb8u1-log
-- PHP Version: 5.6.23-0+deb8u1
Nick Sellen's avatar
Nick Sellen committed
9

Tilmann Becker's avatar
Tilmann Becker committed
10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
Nick Sellen's avatar
Nick Sellen committed
11 12
SET time_zone = "+00:00";

Tilmann Becker's avatar
Tilmann Becker committed
13 14 15 16 17 18

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

Nick Sellen's avatar
Nick Sellen committed
19
--
Tilmann Becker's avatar
Tilmann Becker committed
20
-- Database: `lmr_prod`
Nick Sellen's avatar
Nick Sellen committed
21 22 23 24 25
--

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
26
-- Table structure for table `basket_has_art`
Nick Sellen's avatar
Nick Sellen committed
27 28 29 30
--

CREATE TABLE IF NOT EXISTS `basket_has_art` (
  `basket_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
31
  `art_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
32 33 34 35 36
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
37
-- Table structure for table `basket_has_types`
Nick Sellen's avatar
Nick Sellen committed
38 39 40 41
--

CREATE TABLE IF NOT EXISTS `basket_has_types` (
  `basket_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
42
  `types_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
43 44 45 46 47
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
48
-- Table structure for table `fs_abholen`
Nick Sellen's avatar
Nick Sellen committed
49 50 51 52 53 54
--

CREATE TABLE IF NOT EXISTS `fs_abholen` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `betrieb_id` int(10) unsigned NOT NULL,
  `dow` tinyint(3) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
55
  `time` time DEFAULT NULL
Nick Sellen's avatar
Nick Sellen committed
56 57 58 59 60
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
61
-- Table structure for table `fs_abholer`
Nick Sellen's avatar
Nick Sellen committed
62 63 64 65 66 67
--

CREATE TABLE IF NOT EXISTS `fs_abholer` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `betrieb_id` int(10) unsigned NOT NULL,
  `date` datetime NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
68
  `confirmed` tinyint(3) unsigned NOT NULL DEFAULT '0'
Nick Sellen's avatar
Nick Sellen committed
69 70 71 72 73
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
74
-- Table structure for table `fs_abholmengen`
Nick Sellen's avatar
Nick Sellen committed
75 76 77 78
--

CREATE TABLE IF NOT EXISTS `fs_abholmengen` (
  `id` int(11) NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
79
  `menge` decimal(5,1) NOT NULL
Nick Sellen's avatar
Nick Sellen committed
80 81 82 83 84
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
85
-- Table structure for table `fs_abholzeiten`
Nick Sellen's avatar
Nick Sellen committed
86 87 88 89 90 91
--

CREATE TABLE IF NOT EXISTS `fs_abholzeiten` (
  `betrieb_id` int(10) unsigned NOT NULL,
  `dow` tinyint(3) unsigned NOT NULL,
  `time` time NOT NULL DEFAULT '00:00:00',
Tilmann Becker's avatar
Tilmann Becker committed
92
  `fetcher` tinyint(3) unsigned NOT NULL DEFAULT '4'
Nick Sellen's avatar
Nick Sellen committed
93 94 95 96 97
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
98
-- Table structure for table `fs_activity`
Nick Sellen's avatar
Nick Sellen committed
99 100 101 102
--

CREATE TABLE IF NOT EXISTS `fs_activity` (
  `foodsaver_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
103
  `zeit` datetime DEFAULT NULL
Nick Sellen's avatar
Nick Sellen committed
104 105 106 107 108
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
109
-- Table structure for table `fs_answer`
Nick Sellen's avatar
Nick Sellen committed
110 111 112
--

CREATE TABLE IF NOT EXISTS `fs_answer` (
Tilmann Becker's avatar
Tilmann Becker committed
113
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
114 115 116
  `question_id` int(10) unsigned NOT NULL,
  `text` text,
  `explanation` text NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
117 118 119 120 121 122 123 124 125 126 127 128 129
  `right` tinyint(1) unsigned DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=464 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `fs_apitoken`
--

CREATE TABLE IF NOT EXISTS `fs_apitoken` (
  `foodsaver_id` int(11) NOT NULL,
  `token` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Nick Sellen's avatar
Nick Sellen committed
130 131 132 133

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
134
-- Table structure for table `fs_application_has_wallpost`
Nick Sellen's avatar
Nick Sellen committed
135 136 137 138
--

CREATE TABLE IF NOT EXISTS `fs_application_has_wallpost` (
  `application_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
139
  `wallpost_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
140 141 142 143 144
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
145
-- Table structure for table `fs_autokennzeichen`
Nick Sellen's avatar
Nick Sellen committed
146 147 148
--

CREATE TABLE IF NOT EXISTS `fs_autokennzeichen` (
Tilmann Becker's avatar
Tilmann Becker committed
149
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
150 151
  `land_id` int(10) unsigned NOT NULL,
  `name` varchar(5) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
152 153
  `title` varchar(100) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=581 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
154 155 156 157

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
158
-- Table structure for table `fs_basket`
Nick Sellen's avatar
Nick Sellen committed
159 160 161
--

CREATE TABLE IF NOT EXISTS `fs_basket` (
Tilmann Becker's avatar
Tilmann Becker committed
162
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
  `foodsaver_id` int(10) unsigned NOT NULL,
  `status` tinyint(2) unsigned DEFAULT NULL,
  `time` datetime DEFAULT NULL,
  `until` date NOT NULL,
  `fetchtime` datetime DEFAULT NULL,
  `description` text,
  `picture` varchar(150) DEFAULT NULL,
  `tel` varchar(50) NOT NULL DEFAULT '',
  `handy` varchar(50) NOT NULL DEFAULT '',
  `contact_type` varchar(20) NOT NULL DEFAULT '1',
  `location_type` tinyint(2) unsigned DEFAULT NULL,
  `weight` float DEFAULT NULL,
  `lat` float(10,6) NOT NULL DEFAULT '0.000000',
  `lon` float(10,6) NOT NULL DEFAULT '0.000000',
  `bezirk_id` int(10) unsigned NOT NULL,
  `fs_id` int(10) NOT NULL DEFAULT '0',
Tilmann Becker's avatar
Tilmann Becker committed
179 180
  `appost` tinyint(2) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=38738 DEFAULT CHARSET=latin1;
Nick Sellen's avatar
Nick Sellen committed
181 182 183 184

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
185
-- Table structure for table `fs_basket_anfrage`
Nick Sellen's avatar
Nick Sellen committed
186 187 188 189 190 191 192
--

CREATE TABLE IF NOT EXISTS `fs_basket_anfrage` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `basket_id` int(10) unsigned NOT NULL,
  `status` tinyint(2) unsigned DEFAULT NULL,
  `time` datetime NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
193
  `appost` tinyint(2) NOT NULL DEFAULT '0'
Nick Sellen's avatar
Nick Sellen committed
194 195 196 197 198
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
199
-- Table structure for table `fs_basket_has_art`
Nick Sellen's avatar
Nick Sellen committed
200 201 202 203
--

CREATE TABLE IF NOT EXISTS `fs_basket_has_art` (
  `basket_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
204
  `art_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
205 206 207 208 209
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
210
-- Table structure for table `fs_basket_has_types`
Nick Sellen's avatar
Nick Sellen committed
211 212 213 214
--

CREATE TABLE IF NOT EXISTS `fs_basket_has_types` (
  `basket_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
215
  `types_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
216 217 218 219 220
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
221
-- Table structure for table `fs_basket_has_wallpost`
Nick Sellen's avatar
Nick Sellen committed
222 223 224 225
--

CREATE TABLE IF NOT EXISTS `fs_basket_has_wallpost` (
  `basket_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
226
  `wallpost_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
227 228 229 230 231
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
232
-- Table structure for table `fs_bell`
Nick Sellen's avatar
Nick Sellen committed
233 234 235
--

CREATE TABLE IF NOT EXISTS `fs_bell` (
Tilmann Becker's avatar
Tilmann Becker committed
236
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
237 238 239 240 241 242 243
  `name` varchar(50) DEFAULT NULL,
  `body` varchar(50) DEFAULT NULL,
  `vars` text,
  `attr` varchar(500) DEFAULT NULL,
  `icon` varchar(150) DEFAULT NULL,
  `identifier` varchar(40) DEFAULT NULL,
  `time` datetime NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
244 245
  `closeable` tinyint(1) unsigned NOT NULL DEFAULT '1'
) ENGINE=InnoDB AUTO_INCREMENT=208493 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
246 247 248 249

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
250
-- Table structure for table `fs_betrieb`
Nick Sellen's avatar
Nick Sellen committed
251 252 253
--

CREATE TABLE IF NOT EXISTS `fs_betrieb` (
Tilmann Becker's avatar
Tilmann Becker committed
254
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
  `betrieb_status_id` int(10) unsigned NOT NULL,
  `bezirk_id` int(10) unsigned NOT NULL,
  `added` date NOT NULL,
  `plz` varchar(5) NOT NULL,
  `stadt` varchar(50) NOT NULL,
  `lat` varchar(20) NOT NULL,
  `lon` varchar(20) NOT NULL,
  `kette_id` int(10) unsigned NOT NULL,
  `betrieb_kategorie_id` int(10) unsigned NOT NULL,
  `name` varchar(120) DEFAULT NULL,
  `str` varchar(120) DEFAULT NULL,
  `hsnr` varchar(20) DEFAULT NULL,
  `status_date` date DEFAULT NULL,
  `status` tinyint(3) unsigned DEFAULT NULL,
  `ansprechpartner` varchar(60) DEFAULT NULL,
  `telefon` varchar(50) DEFAULT NULL,
  `fax` varchar(50) DEFAULT NULL,
  `email` varchar(60) DEFAULT NULL,
  `begin` date NOT NULL,
  `besonderheiten` text NOT NULL,
  `public_info` varchar(200) NOT NULL,
  `public_time` tinyint(2) NOT NULL,
  `ueberzeugungsarbeit` tinyint(4) NOT NULL,
  `presse` tinyint(4) NOT NULL,
  `sticker` tinyint(4) NOT NULL,
  `abholmenge` tinyint(4) NOT NULL,
  `team_status` tinyint(2) NOT NULL DEFAULT '1' COMMENT '0 = Team Voll; 1 = Es werden noch Helfer gesucht; 2 = Es werden dringend Helfer gesucht',
  `prefetchtime` int(10) unsigned NOT NULL DEFAULT '1209600',
  `team_conversation_id` int(10) unsigned DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
284 285
  `springer_conversation_id` int(10) unsigned DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=15906 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
286 287 288 289

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
290
-- Table structure for table `fs_betrieb_has_lebensmittel`
Nick Sellen's avatar
Nick Sellen committed
291 292 293 294
--

CREATE TABLE IF NOT EXISTS `fs_betrieb_has_lebensmittel` (
  `betrieb_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
295
  `lebensmittel_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
296 297 298 299 300
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
301
-- Table structure for table `fs_betrieb_kategorie`
Nick Sellen's avatar
Nick Sellen committed
302 303 304
--

CREATE TABLE IF NOT EXISTS `fs_betrieb_kategorie` (
Tilmann Becker's avatar
Tilmann Becker committed
305 306 307
`id` int(10) unsigned NOT NULL,
  `name` varchar(50) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=266 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
308 309 310 311

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
312
-- Table structure for table `fs_betrieb_notiz`
Nick Sellen's avatar
Nick Sellen committed
313 314 315
--

CREATE TABLE IF NOT EXISTS `fs_betrieb_notiz` (
Tilmann Becker's avatar
Tilmann Becker committed
316
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
317 318 319 320 321
  `foodsaver_id` int(10) unsigned NOT NULL,
  `betrieb_id` int(10) unsigned NOT NULL,
  `milestone` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `text` text,
  `zeit` datetime DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
322 323
  `last` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=397095 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
324 325 326 327

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
328
-- Table structure for table `fs_betrieb_status`
Nick Sellen's avatar
Nick Sellen committed
329 330 331
--

CREATE TABLE IF NOT EXISTS `fs_betrieb_status` (
Tilmann Becker's avatar
Tilmann Becker committed
332 333 334
`id` int(10) unsigned NOT NULL,
  `name` varchar(100) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
335 336 337 338

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
339
-- Table structure for table `fs_betrieb_team`
Nick Sellen's avatar
Nick Sellen committed
340 341 342 343 344 345 346 347 348 349 350
--

CREATE TABLE IF NOT EXISTS `fs_betrieb_team` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `betrieb_id` int(10) unsigned NOT NULL,
  `verantwortlich` tinyint(3) unsigned DEFAULT '0',
  `active` int(11) NOT NULL DEFAULT '0',
  `stat_last_update` datetime NOT NULL,
  `stat_fetchcount` int(10) unsigned NOT NULL,
  `stat_first_fetch` date NOT NULL,
  `stat_last_fetch` datetime NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
351
  `stat_add_date` date NOT NULL
Nick Sellen's avatar
Nick Sellen committed
352 353 354 355 356
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
357
-- Table structure for table `fs_bezirk`
Nick Sellen's avatar
Nick Sellen committed
358 359 360
--

CREATE TABLE IF NOT EXISTS `fs_bezirk` (
Tilmann Becker's avatar
Tilmann Becker committed
361
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388
  `parent_id` int(11) unsigned DEFAULT '0',
  `has_children` tinyint(4) NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1',
  `teaser` text NOT NULL,
  `desc` text NOT NULL,
  `photo` varchar(200) NOT NULL,
  `master` int(10) unsigned NOT NULL DEFAULT '0',
  `mailbox_id` int(10) unsigned NOT NULL DEFAULT '0',
  `name` varchar(50) DEFAULT NULL,
  `email` varchar(120) NOT NULL,
  `email_pass` varchar(50) NOT NULL,
  `email_name` varchar(100) NOT NULL,
  `apply_type` tinyint(2) NOT NULL DEFAULT '2',
  `banana_count` tinyint(3) NOT NULL DEFAULT '0',
  `fetch_count` tinyint(3) NOT NULL DEFAULT '0',
  `week_num` tinyint(3) NOT NULL DEFAULT '0',
  `report_num` tinyint(3) NOT NULL,
  `stat_last_update` datetime NOT NULL,
  `stat_fetchweight` decimal(10,2) unsigned NOT NULL,
  `stat_fetchcount` int(10) unsigned NOT NULL,
  `stat_postcount` int(10) unsigned NOT NULL,
  `stat_betriebcount` int(7) unsigned NOT NULL,
  `stat_korpcount` int(7) unsigned NOT NULL,
  `stat_botcount` int(7) unsigned NOT NULL,
  `stat_fscount` int(7) unsigned NOT NULL,
  `stat_fairteilercount` int(7) unsigned NOT NULL,
  `conversation_id` int(10) unsigned NOT NULL DEFAULT '0',
Tilmann Becker's avatar
Tilmann Becker committed
389 390
  `moderated` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=1330 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
391 392 393 394

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
395
-- Table structure for table `fs_bezirk_closure`
Nick Sellen's avatar
Nick Sellen committed
396 397 398 399 400
--

CREATE TABLE IF NOT EXISTS `fs_bezirk_closure` (
  `bezirk_id` int(10) unsigned NOT NULL,
  `ancestor_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
401
  `depth` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
402 403 404 405 406
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
407
-- Table structure for table `fs_bezirk_has_theme`
Nick Sellen's avatar
Nick Sellen committed
408 409 410 411 412
--

CREATE TABLE IF NOT EXISTS `fs_bezirk_has_theme` (
  `theme_id` int(10) unsigned NOT NULL,
  `bezirk_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
413
  `bot_theme` tinyint(3) unsigned NOT NULL DEFAULT '0'
Nick Sellen's avatar
Nick Sellen committed
414 415 416 417 418
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
419
-- Table structure for table `fs_bezirk_has_wallpost`
Nick Sellen's avatar
Nick Sellen committed
420 421 422 423
--

CREATE TABLE IF NOT EXISTS `fs_bezirk_has_wallpost` (
  `bezirk_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
424
  `wallpost_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
425 426 427 428 429
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
430
-- Table structure for table `fs_blog_entry`
Nick Sellen's avatar
Nick Sellen committed
431 432 433
--

CREATE TABLE IF NOT EXISTS `fs_blog_entry` (
Tilmann Becker's avatar
Tilmann Becker committed
434
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
435 436 437 438 439 440 441
  `bezirk_id` int(10) unsigned NOT NULL,
  `foodsaver_id` int(10) unsigned NOT NULL,
  `active` tinyint(3) unsigned NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `teaser` varchar(500) DEFAULT NULL,
  `body` text,
  `time` datetime DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
442 443
  `picture` varchar(150) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=220 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
444 445 446 447

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
448
-- Table structure for table `fs_botschafter`
Nick Sellen's avatar
Nick Sellen committed
449 450 451 452
--

CREATE TABLE IF NOT EXISTS `fs_botschafter` (
  `foodsaver_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
453
  `bezirk_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
454 455 456 457 458
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
459
-- Table structure for table `fs_buddy`
Nick Sellen's avatar
Nick Sellen committed
460 461 462 463 464
--

CREATE TABLE IF NOT EXISTS `fs_buddy` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `buddy_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
465
  `confirmed` tinyint(1) unsigned DEFAULT NULL
Nick Sellen's avatar
Nick Sellen committed
466 467 468 469 470
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
471
-- Table structure for table `fs_bundesland`
Nick Sellen's avatar
Nick Sellen committed
472 473 474
--

CREATE TABLE IF NOT EXISTS `fs_bundesland` (
Tilmann Becker's avatar
Tilmann Becker committed
475
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
476
  `land_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
477 478
  `name` varchar(160) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
479 480 481 482

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
483
-- Table structure for table `fs_cache`
Nick Sellen's avatar
Nick Sellen committed
484 485 486 487
--

CREATE TABLE IF NOT EXISTS `fs_cache` (
  `id` varchar(50) NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
488
  `value` text NOT NULL
Nick Sellen's avatar
Nick Sellen committed
489 490 491 492 493
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
494
-- Table structure for table `fs_contact`
Nick Sellen's avatar
Nick Sellen committed
495 496 497
--

CREATE TABLE IF NOT EXISTS `fs_contact` (
Tilmann Becker's avatar
Tilmann Becker committed
498
`id` int(11) NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
499
  `name` varchar(100) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
500 501
  `email` varchar(155) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=18626 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
502 503 504 505

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
506
-- Table structure for table `fs_content`
Nick Sellen's avatar
Nick Sellen committed
507 508 509
--

CREATE TABLE IF NOT EXISTS `fs_content` (
Tilmann Becker's avatar
Tilmann Becker committed
510
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
511 512 513
  `name` varchar(20) DEFAULT NULL,
  `title` varchar(120) DEFAULT NULL,
  `body` text,
Tilmann Becker's avatar
Tilmann Becker committed
514 515
  `last_mod` datetime DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
516 517 518 519

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
520
-- Table structure for table `fs_conversation`
Nick Sellen's avatar
Nick Sellen committed
521 522 523
--

CREATE TABLE IF NOT EXISTS `fs_conversation` (
Tilmann Becker's avatar
Tilmann Becker committed
524
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
525
  `locked` tinyint(1) NOT NULL DEFAULT '0',
Tilmann Becker's avatar
Tilmann Becker committed
526
  `name` varchar(40) NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
527 528 529 530 531 532
  `start` datetime DEFAULT NULL,
  `last` datetime DEFAULT NULL,
  `last_foodsaver_id` int(10) unsigned DEFAULT NULL,
  `start_foodsaver_id` int(10) unsigned NOT NULL,
  `last_message_id` int(10) unsigned NOT NULL,
  `last_message` text NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
533 534
  `member` text NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=682361 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
535 536 537 538

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
539
-- Table structure for table `fs_document`
Nick Sellen's avatar
Nick Sellen committed
540 541 542
--

CREATE TABLE IF NOT EXISTS `fs_document` (
Tilmann Becker's avatar
Tilmann Becker committed
543
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
544 545 546
  `name` varchar(50) DEFAULT NULL,
  `file` varchar(300) DEFAULT NULL,
  `body` text NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
547 548
  `rolle` tinyint(3) unsigned DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
549 550 551 552

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
553
-- Table structure for table `fs_email_blacklist`
Nick Sellen's avatar
Nick Sellen committed
554 555 556 557 558 559 560 561 562 563 564
--

CREATE TABLE IF NOT EXISTS `fs_email_blacklist` (
  `email` varchar(255) NOT NULL,
  `since` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `reason` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
565
-- Table structure for table `fs_email_status`
Nick Sellen's avatar
Nick Sellen committed
566 567 568 569 570
--

CREATE TABLE IF NOT EXISTS `fs_email_status` (
  `email_id` int(10) unsigned NOT NULL,
  `foodsaver_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
571
  `status` tinyint(3) unsigned DEFAULT '0'
Nick Sellen's avatar
Nick Sellen committed
572 573 574 575 576
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
577
-- Table structure for table `fs_event`
Nick Sellen's avatar
Nick Sellen committed
578 579 580
--

CREATE TABLE IF NOT EXISTS `fs_event` (
Tilmann Becker's avatar
Tilmann Becker committed
581
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
582 583 584 585 586 587 588 589 590
  `foodsaver_id` int(10) unsigned NOT NULL,
  `bezirk_id` int(10) unsigned NOT NULL,
  `location_id` int(10) unsigned NOT NULL,
  `public` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(200) DEFAULT NULL,
  `start` datetime NOT NULL,
  `end` datetime NOT NULL,
  `description` text,
  `bot` tinyint(2) unsigned DEFAULT '0',
Tilmann Becker's avatar
Tilmann Becker committed
591 592
  `online` tinyint(2) unsigned DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=4126 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
593 594 595 596

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
597
-- Table structure for table `fs_event_has_wallpost`
Nick Sellen's avatar
Nick Sellen committed
598 599 600 601
--

CREATE TABLE IF NOT EXISTS `fs_event_has_wallpost` (
  `event_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
602
  `wallpost_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
603 604 605 606 607
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
608
-- Table structure for table `fs_event_registration`
Nick Sellen's avatar
Nick Sellen committed
609 610 611
--

CREATE TABLE IF NOT EXISTS `fs_event_registration` (
Tilmann Becker's avatar
Tilmann Becker committed
612
`id` int(11) NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638
  `name` varchar(255) NOT NULL,
  `geb_datum` date NOT NULL,
  `ort` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(100) NOT NULL,
  `take_part` set('0','1','2','3') NOT NULL,
  `sleep_at` set('0','1','2') NOT NULL,
  `sleep_slots` int(11) NOT NULL,
  `sleep_need` tinyint(4) NOT NULL,
  `languages` set('0','1','2','3') NOT NULL,
  `nutrition` tinyint(4) NOT NULL,
  `special_nutrition` text NOT NULL,
  `other_languages` text NOT NULL,
  `translation_necessary` tinyint(4) NOT NULL,
  `already_foodsaver` tinyint(4) NOT NULL,
  `childcare` text NOT NULL,
  `comments` text NOT NULL,
  `foodsaver_id` int(11) DEFAULT NULL,
  `ip` varchar(60) NOT NULL,
  `signup_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `signup_lang` varchar(20) NOT NULL,
  `emailvalid` tinyint(4) NOT NULL,
  `languages_translate` set('0','1','2','3') NOT NULL,
  `other_languages_translate` text NOT NULL,
  `on_place` tinyint(4) NOT NULL,
  `admin_comment` text,
Tilmann Becker's avatar
Tilmann Becker committed
639 640
  `available_thursday` set('0') DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=994 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
641 642 643 644

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
645
-- Table structure for table `fs_event_workshops`
Nick Sellen's avatar
Nick Sellen committed
646 647 648
--

CREATE TABLE IF NOT EXISTS `fs_event_workshops` (
Tilmann Becker's avatar
Tilmann Becker committed
649
`id` int(11) NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
650 651 652 653
  `name` varchar(255) NOT NULL,
  `start` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `duration` int(11) NOT NULL,
  `allowed_attendants` int(11) NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
654 655
  `name_en` varchar(255) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
656 657 658 659

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
660
-- Table structure for table `fs_event_workshop_registration`
Nick Sellen's avatar
Nick Sellen committed
661 662 663 664 665 666 667
--

CREATE TABLE IF NOT EXISTS `fs_event_workshop_registration` (
  `wid` int(11) NOT NULL DEFAULT '-1',
  `uid` int(11) NOT NULL,
  `wish` smallint(6) NOT NULL,
  `confirmed` tinyint(4) NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
668 669
`id` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2921 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
670 671 672 673

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
674
-- Table structure for table `fs_fairteiler`
Nick Sellen's avatar
Nick Sellen committed
675 676 677
--

CREATE TABLE IF NOT EXISTS `fs_fairteiler` (
Tilmann Becker's avatar
Tilmann Becker committed
678
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
679 680 681 682 683 684 685 686 687 688 689
  `bezirk_id` int(10) unsigned NOT NULL,
  `name` varchar(260) DEFAULT NULL,
  `picture` varchar(100) NOT NULL,
  `status` tinyint(3) unsigned DEFAULT NULL,
  `desc` text,
  `anschrift` varchar(260) DEFAULT NULL,
  `plz` varchar(5) DEFAULT NULL,
  `ort` varchar(100) DEFAULT NULL,
  `lat` varchar(100) DEFAULT NULL,
  `lon` varchar(100) DEFAULT NULL,
  `add_date` date DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
690 691
  `add_foodsaver` int(10) unsigned DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=707 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
692 693 694 695

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
696
-- Table structure for table `fs_fairteiler_follower`
Nick Sellen's avatar
Nick Sellen committed
697 698 699 700 701 702
--

CREATE TABLE IF NOT EXISTS `fs_fairteiler_follower` (
  `fairteiler_id` int(10) unsigned NOT NULL,
  `foodsaver_id` int(10) unsigned NOT NULL,
  `type` tinyint(3) unsigned NOT NULL DEFAULT '1',
Tilmann Becker's avatar
Tilmann Becker committed
703
  `infotype` tinyint(3) unsigned NOT NULL DEFAULT '1'
Nick Sellen's avatar
Nick Sellen committed
704 705 706 707 708
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
709
-- Table structure for table `fs_fairteiler_has_wallpost`
Nick Sellen's avatar
Nick Sellen committed
710 711 712 713
--

CREATE TABLE IF NOT EXISTS `fs_fairteiler_has_wallpost` (
  `fairteiler_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
714
  `wallpost_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
715 716 717 718 719
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
720
-- Table structure for table `fs_faq`
Nick Sellen's avatar
Nick Sellen committed
721 722 723
--

CREATE TABLE IF NOT EXISTS `fs_faq` (
Tilmann Becker's avatar
Tilmann Becker committed
724
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
725 726 727
  `foodsaver_id` int(10) unsigned NOT NULL,
  `faq_kategorie_id` int(10) unsigned NOT NULL,
  `name` varchar(500) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
728 729
  `answer` text
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
730 731 732 733

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
734
-- Table structure for table `fs_faq_category`
Nick Sellen's avatar
Nick Sellen committed
735 736 737
--

CREATE TABLE IF NOT EXISTS `fs_faq_category` (
Tilmann Becker's avatar
Tilmann Becker committed
738 739 740
`id` int(10) unsigned NOT NULL,
  `name` varchar(50) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
741 742 743 744

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
745
-- Table structure for table `fs_fetchdate`
Nick Sellen's avatar
Nick Sellen committed
746 747 748
--

CREATE TABLE IF NOT EXISTS `fs_fetchdate` (
Tilmann Becker's avatar
Tilmann Becker committed
749
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
750 751
  `betrieb_id` int(10) unsigned NOT NULL,
  `time` datetime DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
752 753
  `fetchercount` tinyint(3) unsigned DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=29601 DEFAULT CHARSET=latin1;
Nick Sellen's avatar
Nick Sellen committed
754 755 756 757

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
758
-- Table structure for table `fs_foodsaver`
Nick Sellen's avatar
Nick Sellen committed
759 760 761
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver` (
Tilmann Becker's avatar
Tilmann Becker committed
762
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822
  `autokennzeichen_id` int(10) unsigned NOT NULL,
  `bezirk_id` int(10) unsigned NOT NULL,
  `position` varchar(255) NOT NULL DEFAULT '',
  `verified` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `last_pass` datetime NOT NULL,
  `new_bezirk` varchar(120) NOT NULL,
  `want_new` tinyint(4) NOT NULL DEFAULT '0',
  `mailbox_id` int(10) unsigned NOT NULL DEFAULT '0',
  `rolle` tinyint(4) NOT NULL,
  `type` tinyint(4) DEFAULT '0',
  `plz` varchar(5) NOT NULL,
  `stadt` varchar(50) NOT NULL,
  `bundesland_id` int(11) NOT NULL,
  `lat` varchar(20) NOT NULL,
  `lon` varchar(20) NOT NULL,
  `photo` varchar(50) NOT NULL,
  `photo_public` tinyint(4) NOT NULL DEFAULT '0',
  `email` varchar(120) DEFAULT NULL,
  `passwd` varchar(32) DEFAULT NULL,
  `name` varchar(120) DEFAULT NULL,
  `admin` tinyint(3) unsigned DEFAULT NULL,
  `nachname` varchar(120) DEFAULT NULL,
  `anschrift` varchar(120) DEFAULT NULL,
  `telefon` varchar(30) DEFAULT NULL,
  `tox` varchar(255) NOT NULL DEFAULT '',
  `homepage` varchar(255) NOT NULL DEFAULT '',
  `github` varchar(255) NOT NULL DEFAULT '',
  `twitter` varchar(255) NOT NULL DEFAULT '',
  `handy` varchar(50) DEFAULT NULL,
  `geschlecht` tinyint(3) unsigned DEFAULT NULL,
  `geb_datum` date DEFAULT NULL,
  `fs_id` int(11) DEFAULT '0',
  `anmeldedatum` datetime DEFAULT NULL,
  `orgateam` tinyint(3) unsigned DEFAULT '0',
  `active` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `data` text NOT NULL,
  `about_me_public` text NOT NULL,
  `newsletter` tinyint(1) NOT NULL DEFAULT '1',
  `token` varchar(25) NOT NULL,
  `infomail_message` tinyint(1) NOT NULL DEFAULT '1',
  `last_login` datetime NOT NULL,
  `stat_fetchweight` decimal(7,2) unsigned NOT NULL DEFAULT '0.00',
  `stat_fetchcount` int(10) unsigned NOT NULL DEFAULT '0',
  `stat_ratecount` int(10) unsigned NOT NULL DEFAULT '0',
  `stat_rating` decimal(4,2) unsigned NOT NULL DEFAULT '0.00',
  `stat_postcount` int(11) NOT NULL DEFAULT '0',
  `stat_buddycount` int(7) unsigned NOT NULL,
  `stat_bananacount` int(7) unsigned NOT NULL DEFAULT '0',
  `stat_fetchrate` decimal(6,2) NOT NULL DEFAULT '100.00',
  `sleep_status` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `sleep_from` date NOT NULL,
  `sleep_until` date NOT NULL,
  `sleep_msg` text NOT NULL,
  `gcm` varchar(512) NOT NULL DEFAULT '',
  `iosid` varchar(512) NOT NULL DEFAULT '',
  `last_mid` date NOT NULL,
  `option` text NOT NULL,
  `beta` tinyint(1) NOT NULL DEFAULT '0',
  `fs_password` varchar(50) DEFAULT NULL,
  `quiz_rolle` tinyint(1) unsigned NOT NULL DEFAULT '0',
Tilmann Becker's avatar
Tilmann Becker committed
823 824
  `contact_public` tinyint(4) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=151030 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
825 826 827 828

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
829
-- Table structure for table `fs_foodsaver_archive`
Nick Sellen's avatar
Nick Sellen committed
830 831 832
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver_archive` (
Tilmann Becker's avatar
Tilmann Becker committed
833
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893
  `autokennzeichen_id` int(10) unsigned NOT NULL,
  `bezirk_id` int(10) unsigned NOT NULL,
  `position` varchar(255) NOT NULL DEFAULT '',
  `verified` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `last_pass` datetime NOT NULL,
  `new_bezirk` varchar(120) NOT NULL,
  `want_new` tinyint(4) NOT NULL DEFAULT '0',
  `mailbox_id` int(10) unsigned NOT NULL DEFAULT '0',
  `rolle` tinyint(4) NOT NULL,
  `type` tinyint(4) DEFAULT '0',
  `plz` varchar(5) NOT NULL,
  `stadt` varchar(50) NOT NULL,
  `bundesland_id` int(11) NOT NULL,
  `lat` varchar(20) NOT NULL,
  `lon` varchar(20) NOT NULL,
  `photo` varchar(50) NOT NULL,
  `photo_public` tinyint(4) NOT NULL DEFAULT '0',
  `email` varchar(120) DEFAULT NULL,
  `passwd` varchar(32) DEFAULT NULL,
  `name` varchar(120) DEFAULT NULL,
  `admin` tinyint(3) unsigned DEFAULT NULL,
  `nachname` varchar(120) DEFAULT NULL,
  `anschrift` varchar(120) DEFAULT NULL,
  `telefon` varchar(30) DEFAULT NULL,
  `tox` varchar(255) NOT NULL DEFAULT '',
  `homepage` varchar(255) NOT NULL DEFAULT '',
  `github` varchar(255) NOT NULL DEFAULT '',
  `twitter` varchar(255) NOT NULL DEFAULT '',
  `handy` varchar(50) DEFAULT NULL,
  `geschlecht` tinyint(3) unsigned DEFAULT NULL,
  `geb_datum` date DEFAULT NULL,
  `fs_id` int(11) DEFAULT '0',
  `anmeldedatum` datetime DEFAULT NULL,
  `orgateam` tinyint(3) unsigned DEFAULT '0',
  `active` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `data` text NOT NULL,
  `about_me_public` text NOT NULL,
  `newsletter` tinyint(1) NOT NULL DEFAULT '1',
  `token` varchar(25) NOT NULL,
  `infomail_message` tinyint(1) NOT NULL DEFAULT '1',
  `last_login` datetime NOT NULL,
  `stat_fetchweight` decimal(7,2) unsigned NOT NULL DEFAULT '0.00',
  `stat_fetchcount` int(10) unsigned NOT NULL DEFAULT '0',
  `stat_ratecount` int(10) unsigned NOT NULL DEFAULT '0',
  `stat_rating` decimal(4,2) unsigned NOT NULL DEFAULT '0.00',
  `stat_postcount` int(11) NOT NULL DEFAULT '0',
  `stat_buddycount` int(7) unsigned NOT NULL,
  `stat_bananacount` int(7) unsigned NOT NULL DEFAULT '0',
  `stat_fetchrate` decimal(6,2) NOT NULL DEFAULT '100.00',
  `sleep_status` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `sleep_from` date NOT NULL,
  `sleep_until` date NOT NULL,
  `sleep_msg` text NOT NULL,
  `gcm` varchar(512) NOT NULL DEFAULT '',
  `iosid` varchar(512) NOT NULL DEFAULT '',
  `last_mid` date NOT NULL,
  `option` text NOT NULL,
  `beta` tinyint(1) NOT NULL DEFAULT '0',
  `fs_password` varchar(50) DEFAULT NULL,
  `quiz_rolle` tinyint(1) unsigned NOT NULL DEFAULT '0',
Tilmann Becker's avatar
Tilmann Becker committed
894 895
  `contact_public` tinyint(4) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=150886 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
896 897 898 899

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
900
-- Table structure for table `fs_foodsaver_archive2`
Nick Sellen's avatar
Nick Sellen committed
901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver_archive2` (
  `id` int(10) unsigned NOT NULL,
  `autokennzeichen_id` int(10) unsigned NOT NULL,
  `bezirk_id` int(10) unsigned NOT NULL,
  `verified` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `last_pass` datetime NOT NULL,
  `new_bezirk` varchar(120) NOT NULL,
  `want_new` tinyint(4) NOT NULL DEFAULT '0',
  `rolle` tinyint(4) NOT NULL,
  `type` tinyint(4) DEFAULT '0',
  `mailbox_id` int(10) unsigned NOT NULL DEFAULT '0',
  `plz` varchar(5) NOT NULL,
  `stadt` varchar(50) NOT NULL,
  `bundesland_id` int(11) NOT NULL,
  `lat` varchar(20) NOT NULL,
  `lon` varchar(20) NOT NULL,
  `photo` varchar(50) NOT NULL,
  `photo_public` tinyint(4) NOT NULL DEFAULT '0',
  `email` varchar(120) DEFAULT NULL,
  `passwd` varchar(32) DEFAULT NULL,
  `name` varchar(120) DEFAULT NULL,
  `admin` tinyint(3) unsigned DEFAULT NULL,
  `nachname` varchar(120) DEFAULT NULL,
  `anschrift` varchar(120) DEFAULT NULL,
  `telefon` varchar(30) DEFAULT NULL,
  `handy` varchar(50) DEFAULT NULL,
  `geschlecht` tinyint(3) unsigned DEFAULT NULL,
  `geb_datum` date DEFAULT NULL,
  `fs_id` int(11) DEFAULT '0',
  `anmeldedatum` datetime DEFAULT NULL,
  `orgateam` tinyint(3) unsigned DEFAULT '0',
  `active` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `data` text NOT NULL,
  `about_me_public` text NOT NULL,
  `newsletter` tinyint(1) NOT NULL DEFAULT '1',
  `token` varchar(25) NOT NULL,
  `infomail_message` tinyint(1) NOT NULL DEFAULT '1',
  `last_login` datetime NOT NULL,
  `stat_fetchweight` decimal(7,2) unsigned NOT NULL DEFAULT '0.00',
  `stat_fetchcount` int(10) unsigned NOT NULL DEFAULT '0',
  `stat_ratecount` int(10) unsigned NOT NULL DEFAULT '0',
  `stat_rating` decimal(4,2) unsigned NOT NULL DEFAULT '0.00',
  `stat_postcount` int(11) NOT NULL DEFAULT '0',
  `stat_buddycount` int(7) unsigned NOT NULL,
  `stat_bananacount` int(7) unsigned NOT NULL DEFAULT '1',
  `stat_fetchrate` decimal(6,2) NOT NULL DEFAULT '100.00',
  `option` text NOT NULL,
  `sleep_status` tinyint(3) unsigned NOT NULL,
  `sleep_from` date NOT NULL,
  `sleep_until` date NOT NULL,
  `sleep_msg` text NOT NULL,
  `iosid` varchar(512) NOT NULL,
  `gcm` varchar(512) NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
956
  `beta` tinyint(2) NOT NULL
Nick Sellen's avatar
Nick Sellen committed
957 958 959 960 961
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
962
-- Table structure for table `fs_foodsaver_has_bell`
Nick Sellen's avatar
Nick Sellen committed
963 964 965 966 967
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver_has_bell` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `bell_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
968
  `seen` tinyint(1) unsigned DEFAULT '0'
Nick Sellen's avatar
Nick Sellen committed
969 970 971 972 973
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
974
-- Table structure for table `fs_foodsaver_has_bezirk`
Nick Sellen's avatar
Nick Sellen committed
975 976 977 978 979 980 981
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver_has_bezirk` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `bezirk_id` int(10) unsigned NOT NULL,
  `active` int(10) unsigned DEFAULT '0' COMMENT '0=beworben,1=aktiv,10=vielleicht',
  `added` datetime NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
982
  `application` text NOT NULL
Nick Sellen's avatar
Nick Sellen committed
983 984 985 986 987
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
988
-- Table structure for table `fs_foodsaver_has_contact`
Nick Sellen's avatar
Nick Sellen committed
989 990 991 992
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver_has_contact` (
  `foodsaver_id` int(11) NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
993
  `contact_id` int(11) NOT NULL
Nick Sellen's avatar
Nick Sellen committed
994 995 996 997 998
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
999
-- Table structure for table `fs_foodsaver_has_conversation`
Nick Sellen's avatar
Nick Sellen committed
1000 1001 1002 1003 1004
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver_has_conversation` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `conversation_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1005
  `unread` tinyint(1) unsigned DEFAULT '1'
Nick Sellen's avatar
Nick Sellen committed
1006 1007 1008 1009 1010
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1011
-- Table structure for table `fs_foodsaver_has_event`
Nick Sellen's avatar
Nick Sellen committed
1012 1013 1014 1015 1016
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver_has_event` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `event_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1017
  `status` tinyint(2) unsigned NOT NULL DEFAULT '0'
Nick Sellen's avatar
Nick Sellen committed
1018 1019 1020 1021 1022
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1023
-- Table structure for table `fs_foodsaver_has_fairteiler`
Nick Sellen's avatar
Nick Sellen committed
1024 1025 1026 1027
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver_has_fairteiler` (
  `foodsaver_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1028
  `fairteiler_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
1029 1030 1031 1032 1033
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1034
-- Table structure for table `fs_foodsaver_has_fetchdate`
Nick Sellen's avatar
Nick Sellen committed
1035 1036 1037 1038 1039
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver_has_fetchdate` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `fetchdate_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1040
  `confirmed` tinyint(1) unsigned DEFAULT NULL
Nick Sellen's avatar
Nick Sellen committed
1041 1042 1043 1044 1045
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1046
-- Table structure for table `fs_foodsaver_has_wallpost`
Nick Sellen's avatar
Nick Sellen committed
1047 1048 1049 1050 1051
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver_has_wallpost` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `wallpost_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1052
  `usercomment` tinyint(2) NOT NULL DEFAULT '0'
Nick Sellen's avatar
Nick Sellen committed
1053 1054 1055 1056 1057
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1058
-- Table structure for table `fs_foodsaver_stats`
Nick Sellen's avatar
Nick Sellen committed
1059 1060 1061 1062 1063 1064 1065 1066 1067
--

CREATE TABLE IF NOT EXISTS `fs_foodsaver_stats` (
  `foodsaver_id` int(11) NOT NULL,
  `user_rating` decimal(10,2) DEFAULT NULL,
  `count_fetch` int(11) DEFAULT NULL,
  `count_forum` int(11) DEFAULT NULL,
  `count_vouch` int(11) DEFAULT NULL,
  `gerettet` decimal(10,2) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1068
  `count_rating` int(11) DEFAULT NULL
Nick Sellen's avatar
Nick Sellen committed
1069 1070 1071 1072 1073
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1074
-- Table structure for table `fs_fsreport_has_wallpost`
Nick Sellen's avatar
Nick Sellen committed
1075 1076 1077 1078
--

CREATE TABLE IF NOT EXISTS `fs_fsreport_has_wallpost` (
  `fsreport_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1079
  `wallpost_id` int(10) unsigned NOT NULL
Nick Sellen's avatar
Nick Sellen committed
1080 1081 1082 1083 1084
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1085
-- Table structure for table `fs_geoRegion`
Nick Sellen's avatar
Nick Sellen committed
1086 1087 1088
--

CREATE TABLE IF NOT EXISTS `fs_geoRegion` (
Tilmann Becker's avatar
Tilmann Becker committed
1089 1090 1091
`id` int(10) unsigned NOT NULL,
  `name` varchar(90) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=445 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1092 1093 1094 1095

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1096
-- Table structure for table `fs_glocke`
Nick Sellen's avatar
Nick Sellen committed
1097 1098 1099
--

CREATE TABLE IF NOT EXISTS `fs_glocke` (
Tilmann Becker's avatar
Tilmann Becker committed
1100
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1101 1102 1103
  `name` varchar(150) DEFAULT NULL,
  `msg` varchar(300) NOT NULL,
  `url` varchar(160) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1104 1105
  `time` datetime NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=425246 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1106 1107 1108 1109

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1110
-- Table structure for table `fs_glocke_read`
Nick Sellen's avatar
Nick Sellen committed
1111 1112 1113 1114 1115
--

CREATE TABLE IF NOT EXISTS `fs_glocke_read` (
  `glocke_id` int(10) unsigned NOT NULL,
  `foodsaver_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1116
  `unread` tinyint(3) unsigned DEFAULT '1'
Nick Sellen's avatar
Nick Sellen committed
1117 1118 1119 1120 1121
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1122
-- Table structure for table `fs_ipblock`
Nick Sellen's avatar
Nick Sellen committed
1123 1124 1125 1126 1127 1128
--

CREATE TABLE IF NOT EXISTS `fs_ipblock` (
  `ip` varchar(20) NOT NULL,
  `context` varchar(10) NOT NULL,
  `start` datetime DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1129
  `duration` int(10) unsigned DEFAULT NULL
Nick Sellen's avatar
Nick Sellen committed
1130 1131 1132 1133 1134
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1135
-- Table structure for table `fs_item`
Nick Sellen's avatar
Nick Sellen committed
1136 1137 1138
--

CREATE TABLE IF NOT EXISTS `fs_item` (
Tilmann Becker's avatar
Tilmann Becker committed
1139
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1140 1141
  `item_class_id` int(10) unsigned NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1142 1143
  `status` tinyint(3) unsigned NOT NULL DEFAULT '1'
) ENGINE=InnoDB AUTO_INCREMENT=1112 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1144 1145 1146 1147

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1148
-- Table structure for table `fs_item_class`
Nick Sellen's avatar
Nick Sellen committed
1149 1150 1151
--

CREATE TABLE IF NOT EXISTS `fs_item_class` (
Tilmann Becker's avatar
Tilmann Becker committed
1152
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1153 1154
  `item_type_id` int(10) unsigned NOT NULL,
  `name` varchar(120) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1155 1156
  `desc` text
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1157 1158 1159 1160

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1161
-- Table structure for table `fs_item_request`
Nick Sellen's avatar
Nick Sellen committed
1162 1163 1164 1165 1166
--

CREATE TABLE IF NOT EXISTS `fs_item_request` (
  `user_id` int(10) unsigned NOT NULL,
  `item_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1167
  `time` datetime NOT NULL
Nick Sellen's avatar
Nick Sellen committed
1168 1169 1170 1171 1172
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1173
-- Table structure for table `fs_item_track`
Nick Sellen's avatar
Nick Sellen committed
1174 1175 1176 1177 1178 1179 1180
--

CREATE TABLE IF NOT EXISTS `fs_item_track` (
  `user_id` int(10) unsigned NOT NULL,
  `item_id` int(10) unsigned NOT NULL,
  `time` datetime NOT NULL,
  `lat` varchar(100) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1181
  `lon` varchar(100) DEFAULT NULL
Nick Sellen's avatar
Nick Sellen committed
1182 1183 1184 1185 1186
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1187
-- Table structure for table `fs_item_type`
Nick Sellen's avatar
Nick Sellen committed
1188 1189 1190
--

CREATE TABLE IF NOT EXISTS `fs_item_type` (
Tilmann Becker's avatar
Tilmann Becker committed
1191 1192 1193
`id` int(10) unsigned NOT NULL,
  `name` varchar(120) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1194 1195 1196 1197

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1198
-- Table structure for table `fs_kette`
Nick Sellen's avatar
Nick Sellen committed
1199 1200 1201
--

CREATE TABLE IF NOT EXISTS `fs_kette` (
Tilmann Becker's avatar
Tilmann Becker committed
1202
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1203
  `name` varchar(60) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1204 1205
  `logo` varchar(30) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=398 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1206 1207 1208 1209

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1210
-- Table structure for table `fs_land`
Nick Sellen's avatar
Nick Sellen committed
1211 1212 1213
--

CREATE TABLE IF NOT EXISTS `fs_land` (
Tilmann Becker's avatar
Tilmann Becker committed
1214 1215 1216
`id` int(10) unsigned NOT NULL,
  `name` varchar(90) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1217 1218 1219 1220

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1221
-- Table structure for table `fs_language`
Nick Sellen's avatar
Nick Sellen committed
1222 1223 1224
--

CREATE TABLE IF NOT EXISTS `fs_language` (
Tilmann Becker's avatar
Tilmann Becker committed
1225
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1226
  `name` varchar(50) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1227 1228
  `short` varchar(10) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1229 1230 1231 1232

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1233
-- Table structure for table `fs_lebensmittel`
Nick Sellen's avatar
Nick Sellen committed
1234 1235 1236
--

CREATE TABLE IF NOT EXISTS `fs_lebensmittel` (
Tilmann Becker's avatar
Tilmann Becker committed
1237 1238 1239
`id` int(10) unsigned NOT NULL,
  `name` varchar(50) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1240 1241 1242 1243

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1244
-- Table structure for table `fs_location`
Nick Sellen's avatar
Nick Sellen committed
1245 1246 1247
--

CREATE TABLE IF NOT EXISTS `fs_location` (
Tilmann Becker's avatar
Tilmann Becker committed
1248
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1249 1250 1251 1252 1253
  `name` varchar(200) DEFAULT NULL,
  `lat` decimal(10,8) DEFAULT NULL,
  `lon` decimal(11,8) DEFAULT NULL,
  `zip` varchar(10) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1254 1255
  `street` varchar(200) DEFAULT NULL
) ENGINE=MyISAM AUTO_INCREMENT=4284 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1256 1257 1258 1259

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1260
-- Table structure for table `fs_login`
Nick Sellen's avatar
Nick Sellen committed
1261 1262 1263
--

CREATE TABLE IF NOT EXISTS `fs_login` (
Tilmann Becker's avatar
Tilmann Becker committed
1264
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1265 1266 1267
  `foodsaver_id` int(10) unsigned NOT NULL,
  `ip` varchar(30) DEFAULT NULL,
  `agent` varchar(200) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1268 1269
  `time` datetime DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=6138537 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1270 1271 1272 1273

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1274
-- Table structure for table `fs_mailbox`
Nick Sellen's avatar
Nick Sellen committed
1275 1276 1277
--

CREATE TABLE IF NOT EXISTS `fs_mailbox` (
Tilmann Becker's avatar
Tilmann Becker committed
1278
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1279 1280
  `name` varchar(50) DEFAULT NULL,
  `member` tinyint(4) NOT NULL DEFAULT '0',
Tilmann Becker's avatar
Tilmann Becker committed
1281 1282
  `last_access` datetime NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=28458 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1283 1284 1285 1286

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1287
-- Table structure for table `fs_mailbox_member`
Nick Sellen's avatar
Nick Sellen committed
1288 1289 1290 1291 1292
--

CREATE TABLE IF NOT EXISTS `fs_mailbox_member` (
  `mailbox_id` int(10) unsigned NOT NULL,
  `foodsaver_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1293
  `email_name` varchar(120) NOT NULL
Nick Sellen's avatar
Nick Sellen committed
1294 1295 1296 1297 1298
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1299
-- Table structure for table `fs_mailbox_message`
Nick Sellen's avatar
Nick Sellen committed
1300 1301 1302
--

CREATE TABLE IF NOT EXISTS `fs_mailbox_message` (
Tilmann Becker's avatar
Tilmann Becker committed
1303
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1304 1305 1306 1307 1308 1309 1310 1311 1312 1313
  `mailbox_id` int(10) unsigned NOT NULL,
  `folder` tinyint(3) unsigned DEFAULT '1',
  `sender` varchar(120) DEFAULT NULL,
  `to` text NOT NULL,
  `subject` varchar(120) DEFAULT NULL,
  `body` text,
  `body_html` text NOT NULL,
  `time` datetime DEFAULT NULL,
  `attach` text,
  `read` tinyint(3) unsigned DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1314 1315
  `answer` tinyint(3) unsigned DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=102410 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1316 1317 1318 1319

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1320
-- Table structure for table `fs_mailchange`
Nick Sellen's avatar
Nick Sellen committed
1321 1322 1323 1324 1325 1326
--

CREATE TABLE IF NOT EXISTS `fs_mailchange` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `newmail` varchar(200) DEFAULT NULL,
  `time` datetime DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1327
  `token` varchar(300) DEFAULT NULL
Nick Sellen's avatar
Nick Sellen committed
1328 1329 1330 1331 1332
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1333
-- Table structure for table `fs_mail_error`
Nick Sellen's avatar
Nick Sellen committed
1334 1335 1336
--

CREATE TABLE IF NOT EXISTS `fs_mail_error` (
Tilmann Becker's avatar
Tilmann Becker committed
1337
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1338
  `send_mail_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1339 1340
  `foodsaver_id` int(10) unsigned DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1341 1342 1343 1344

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1345
-- Table structure for table `fs_message`
Nick Sellen's avatar
Nick Sellen committed
1346 1347 1348
--

CREATE TABLE IF NOT EXISTS `fs_message` (
Tilmann Becker's avatar
Tilmann Becker committed
1349
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1350 1351 1352 1353 1354 1355 1356
  `sender_id` int(10) unsigned DEFAULT NULL,
  `recip_id` int(10) unsigned DEFAULT NULL,
  `unread` tinyint(3) unsigned DEFAULT NULL,
  `name` varchar(150) DEFAULT NULL,
  `msg` text,
  `time` datetime DEFAULT NULL,
  `attach` varchar(500) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1357 1358
  `recd` tinyint(2) unsigned NOT NULL DEFAULT '0'
) ENGINE=InnoDB AUTO_INCREMENT=2570714 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1359 1360 1361 1362

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1363
-- Table structure for table `fs_message_tpl`
Nick Sellen's avatar
Nick Sellen committed
1364 1365 1366
--

CREATE TABLE IF NOT EXISTS `fs_message_tpl` (
Tilmann Becker's avatar
Tilmann Becker committed
1367
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1368 1369 1370
  `language_id` int(10) unsigned NOT NULL,
  `name` varchar(40) DEFAULT NULL,
  `subject` varchar(120) NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1371 1372
  `body` text
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1373 1374 1375 1376

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1377
-- Table structure for table `fs_msg`
Nick Sellen's avatar
Nick Sellen committed
1378 1379 1380
--

CREATE TABLE IF NOT EXISTS `fs_msg` (
Tilmann Becker's avatar
Tilmann Becker committed
1381
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1382 1383 1384
  `conversation_id` int(10) unsigned NOT NULL,
  `foodsaver_id` int(10) unsigned NOT NULL,
  `body` text,
Tilmann Becker's avatar
Tilmann Becker committed
1385 1386
  `time` datetime DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4362369 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1387 1388 1389 1390

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1391
-- Table structure for table `fs_mumbleuser`
Nick Sellen's avatar
Nick Sellen committed
1392 1393 1394 1395 1396
--

CREATE TABLE IF NOT EXISTS `fs_mumbleuser` (
  `foodsaver_id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1397
  `sha` varchar(160) NOT NULL
Nick Sellen's avatar
Nick Sellen committed
1398 1399 1400 1401 1402
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1403
-- Table structure for table `fs_partnerschaft`
Nick Sellen's avatar
Nick Sellen committed
1404 1405 1406
--

CREATE TABLE IF NOT EXISTS `fs_partnerschaft` (
Tilmann Becker's avatar
Tilmann Becker committed
1407
`foodsaver_id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1408 1409
  `partner_id` int(10) unsigned NOT NULL,
  `form` tinyint(3) unsigned NOT NULL DEFAULT '1',
Tilmann Becker's avatar
Tilmann Becker committed
1410 1411
  `time` datetime DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=8765 DEFAULT CHARSET=utf8;
Nick Sellen's avatar
Nick Sellen committed
1412 1413 1414 1415

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1416
-- Table structure for table `fs_pass_gen`
Nick Sellen's avatar
Nick Sellen committed
1417 1418 1419 1420
--

CREATE TABLE IF NOT EXISTS `fs_pass_gen` (
  `foodsaver_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1421
  `date` datetime NOT NULL
Nick Sellen's avatar
Nick Sellen committed
1422 1423 1424 1425 1426
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1427
-- Table structure for table `fs_pass_request`
Nick Sellen's avatar
Nick Sellen committed
1428 1429 1430 1431 1432
--

CREATE TABLE IF NOT EXISTS `fs_pass_request` (
  `foodsaver_id` int(10) unsigned NOT NULL,
  `name` varchar(50) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1433
  `time` datetime DEFAULT NULL
Nick Sellen's avatar
Nick Sellen committed
1434 1435 1436 1437 1438
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1439
-- Table structure for table `fs_plz`
Nick Sellen's avatar
Nick Sellen committed
1440 1441 1442 1443 1444 1445 1446 1447 1448 1449
--

CREATE TABLE IF NOT EXISTS `fs_plz` (
  `plz` varchar(5) NOT NULL,
  `stadt_id` int(10) unsigned NOT NULL,
  `stadt_kennzeichen_id` int(10) unsigned NOT NULL,
  `bundesland_id` int(10) unsigned NOT NULL,
  `geoRegion_id` int(10) unsigned NOT NULL,
  `land_id` int(10) unsigned NOT NULL,
  `lat` varchar(60) DEFAULT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1450
  `lon` varchar(60) DEFAULT NULL
Nick Sellen's avatar
Nick Sellen committed
1451 1452 1453 1454 1455
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1456
-- Table structure for table `fs_pushqueue`
Nick Sellen's avatar
Nick Sellen committed
1457 1458 1459
--

CREATE TABLE IF NOT EXISTS `fs_pushqueue` (
Tilmann Becker's avatar
Tilmann Becker committed
1460
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1461 1462 1463 1464 1465 1466 1467 1468 1469
  `sender_id` int(10) unsigned NOT NULL,
  `recip_id` int(10) unsigned NOT NULL,
  `time` datetime NOT NULL,
  `message_id` int(10) unsigned NOT NULL,
  `title` varchar(80) NOT NULL DEFAULT '',
  `message` varchar(400) NOT NULL DEFAULT '',
  `data` text,
  `status` tinyint(2) unsigned DEFAULT NULL,
  `id_gcm` varchar(400) NOT NULL DEFAULT '',
Tilmann Becker's avatar
Tilmann Becker committed
1470 1471
  `id_apn` varchar(400) NOT NULL DEFAULT ''
) ENGINE=InnoDB AUTO_INCREMENT=35328 DEFAULT CHARSET=latin1;
Nick Sellen's avatar
Nick Sellen committed
1472 1473 1474 1475

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1476
-- Table structure for table `fs_question`
Nick Sellen's avatar
Nick Sellen committed
1477 1478 1479
--

CREATE TABLE IF NOT EXISTS `fs_question` (
Tilmann Becker's avatar
Tilmann Becker committed
1480
`id` int(10) unsigned NOT NULL,
Nick Sellen's avatar
Nick Sellen committed
1481 1482
  `text` text,
  `duration` int(3) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1483 1484
  `wikilink` varchar(250) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=115 DEFAULT CHARSET=latin1;
Nick Sellen's avatar
Nick Sellen committed
1485 1486 1487 1488

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1489
-- Table structure for table `fs_question_has_quiz`
Nick Sellen's avatar
Nick Sellen committed
1490 1491 1492 1493 1494
--

CREATE TABLE IF NOT EXISTS `fs_question_has_quiz` (
  `question_id` int(10) unsigned NOT NULL,
  `quiz_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1495
  `fp` tinyint(2) unsigned DEFAULT NULL
Nick Sellen's avatar
Nick Sellen committed
1496 1497 1498 1499 1500
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
Tilmann Becker's avatar
Tilmann Becker committed
1501
-- Table structure for table `fs_question_has_wallpost`
Nick Sellen's avatar
Nick Sellen committed
1502 1503 1504 1505 1506
--

CREATE TABLE IF NOT EXISTS `fs_question_has_wallpost` (
  `question_id` int(10) unsigned NOT NULL,
  `wallpost_id` int(10) unsigned NOT NULL,
Tilmann Becker's avatar
Tilmann Becker committed
1507
  `usercomment` tinyint(2) NOT NULL DEFAULT '0'
Nick Sellen's avatar
Nick Sellen committed
1508 1509 1510