many fixes after test with lots of data
[smr.git] / gui / db / structure.sql
blobbefe09ee886ad62125345bb7e44443de94908c7f
1 -- MySQL dump 10.13  Distrib 5.5.38, for debian-linux-gnu (x86_64)
2 --
3 -- Host: localhost    Database: smr_devel
4 -- ------------------------------------------------------
5 -- Server version       5.5.38-0ubuntu0.14.04.1
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 */;
19 -- Table structure for table `access`
22 DROP TABLE IF EXISTS `access`;
23 /*!40101 SET @saved_cs_client     = @@character_set_client */;
24 /*!40101 SET character_set_client = utf8 */;
25 CREATE TABLE `access` (
26   `id_user` int(11) NOT NULL DEFAULT '0',
27   `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
28   `access` tinyint(1) DEFAULT NULL
29 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
30 /*!40101 SET character_set_client = @saved_cs_client */;
33 -- Table structure for table `comment`
36 DROP TABLE IF EXISTS `comment`;
37 /*!40101 SET @saved_cs_client     = @@character_set_client */;
38 /*!40101 SET character_set_client = utf8 */;
39 CREATE TABLE `comment` (
40   `id` int(11) NOT NULL AUTO_INCREMENT,
41   `id_user` int(11) NOT NULL,
42   `date` int(11) NOT NULL,
43   `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
44   `comment` mediumtext COLLATE utf8_unicode_ci,
45   PRIMARY KEY (`id`)
46 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
47 /*!40101 SET character_set_client = @saved_cs_client */;
50 -- Table structure for table `dividend`
53 DROP TABLE IF EXISTS `dividend`;
54 /*!40101 SET @saved_cs_client     = @@character_set_client */;
55 /*!40101 SET character_set_client = utf8 */;
56 CREATE TABLE `dividend` (
57   `id` int(11) NOT NULL AUTO_INCREMENT,
58   `id_stock` int(11) NOT NULL,
59   `date` int(11) NOT NULL,
60   `received` float NOT NULL DEFAULT '0',
61   PRIMARY KEY (`id`)
62 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
63 /*!40101 SET character_set_client = @saved_cs_client */;
66 -- Table structure for table `document`
69 DROP TABLE IF EXISTS `document`;
70 /*!40101 SET @saved_cs_client     = @@character_set_client */;
71 /*!40101 SET character_set_client = utf8 */;
72 CREATE TABLE `document` (
73   `id` int(11) NOT NULL AUTO_INCREMENT,
74   `id_user` int(11) NOT NULL,
75   `mimetype` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
76   `filename` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
77   `size` int(11) NOT NULL,
78   `date_upload` int(11) NOT NULL,
79   `comment` text COLLATE utf8_unicode_ci,
80   PRIMARY KEY (`id`)
81 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
82 /*!40101 SET character_set_client = @saved_cs_client */;
85 -- Table structure for table `document_assign`
88 DROP TABLE IF EXISTS `document_assign`;
89 /*!40101 SET @saved_cs_client     = @@character_set_client */;
90 /*!40101 SET character_set_client = utf8 */;
91 CREATE TABLE `document_assign` (
92   `id_document` int(11) NOT NULL AUTO_INCREMENT,
93   `id_portfolio` int(11) DEFAULT NULL,
94   `id_position` int(11) DEFAULT NULL,
95   `id_order` int(11) DEFAULT NULL,
96   `id_stock` int(11) DEFAULT NULL,
97   `is_assigned` tinyint(1) DEFAULT NULL,
98   PRIMARY KEY (`id_document`),
99   UNIQUE KEY `id_document` (`id_document`)
100 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
101 /*!40101 SET character_set_client = @saved_cs_client */;
104 -- Table structure for table `document_data`
107 DROP TABLE IF EXISTS `document_data`;
108 /*!40101 SET @saved_cs_client     = @@character_set_client */;
109 /*!40101 SET character_set_client = utf8 */;
110 CREATE TABLE `document_data` (
111   `id_document` int(11) NOT NULL AUTO_INCREMENT,
112   `content` mediumblob NOT NULL,
113   PRIMARY KEY (`id_document`),
114   UNIQUE KEY `id_document` (`id_document`)
115 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
116 /*!40101 SET character_set_client = @saved_cs_client */;
119 -- Table structure for table `figure_data`
122 DROP TABLE IF EXISTS `figure_data`;
123 /*!40101 SET @saved_cs_client     = @@character_set_client */;
124 /*!40101 SET character_set_client = utf8 */;
125 CREATE TABLE `figure_data` (
126   `id` int(11) NOT NULL AUTO_INCREMENT,
127   `id_figure_var` int(11) NOT NULL,
128   `id_stock` int(11) NOT NULL,
129   `date` int(11) NOT NULL,
130   `period` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
131   `analyst` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
132   `value` float NOT NULL,
133   `is_expected` tinyint(1) DEFAULT NULL,
134   `is_audited` tinyint(1) DEFAULT NULL,
135   `comment` text COLLATE utf8_unicode_ci,
136   PRIMARY KEY (`id`)
137 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
138 /*!40101 SET character_set_client = @saved_cs_client */;
141 -- Table structure for table `figure_var`
144 DROP TABLE IF EXISTS `figure_var`;
145 /*!40101 SET @saved_cs_client     = @@character_set_client */;
146 /*!40101 SET character_set_client = utf8 */;
147 CREATE TABLE `figure_var` (
148   `id` int(11) NOT NULL AUTO_INCREMENT,
149   `id_user` int(11) NOT NULL DEFAULT '0',
150   `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
151   `unit` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
152   `expression` mediumtext COLLATE utf8_unicode_ci,
153   `comment` text COLLATE utf8_unicode_ci,
154   PRIMARY KEY (`id`)
155 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
156 /*!40101 SET character_set_client = @saved_cs_client */;
159 -- Table structure for table `news`
162 DROP TABLE IF EXISTS `news`;
163 /*!40101 SET @saved_cs_client     = @@character_set_client */;
164 /*!40101 SET character_set_client = utf8 */;
165 CREATE TABLE `news` (
166   `id_user` int(11) NOT NULL DEFAULT '0',
167   `id_news_feed` int(11) NOT NULL DEFAULT '0',
168   `is_subscribed` tinyint(1) NOT NULL DEFAULT '0'
169 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
170 /*!40101 SET character_set_client = @saved_cs_client */;
173 -- Table structure for table `news_assign`
176 DROP TABLE IF EXISTS `news_assign`;
177 /*!40101 SET @saved_cs_client     = @@character_set_client */;
178 /*!40101 SET character_set_client = utf8 */;
179 CREATE TABLE `news_assign` (
180   `id_news_item` int(11) NOT NULL DEFAULT '0',
181   `id_position` int(11) NOT NULL DEFAULT '0',
182   `is_assigned` tinyint(1) DEFAULT NULL,
183   UNIQUE KEY `NID` (`id_news_item`,`id_position`)
184 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
185 /*!40101 SET character_set_client = @saved_cs_client */;
188 -- Table structure for table `news_feed`
191 DROP TABLE IF EXISTS `news_feed`;
192 /*!40101 SET @saved_cs_client     = @@character_set_client */;
193 /*!40101 SET character_set_client = utf8 */;
194 CREATE TABLE `news_feed` (
195   `id` int(11) NOT NULL AUTO_INCREMENT,
196   `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
197   `fetch_feed` tinyint(1) DEFAULT '1',
198   `last_fetched` int(11) DEFAULT '0',
199   `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
200   `link` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
201   `description` text COLLATE utf8_unicode_ci,
202   `language` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
203   `ttl` int(11) DEFAULT NULL,
204   `copyright` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
205   `count_total` int(11) NOT NULL,
206   PRIMARY KEY (`id`)
207 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
208 /*!40101 SET character_set_client = @saved_cs_client */;
211 -- Table structure for table `news_item`
214 DROP TABLE IF EXISTS `news_item`;
215 /*!40101 SET @saved_cs_client     = @@character_set_client */;
216 /*!40101 SET character_set_client = utf8 */;
217 CREATE TABLE `news_item` (
218   `id` int(11) NOT NULL AUTO_INCREMENT,
219   `id_news_feed` int(11) NOT NULL DEFAULT '0',
220   `identifier` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
221   `identifier_method` varchar(0) COLLATE utf8_unicode_ci NOT NULL,
222   `fetched` int(11) NOT NULL,
223   `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
224   `link` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
225   `description` text COLLATE utf8_unicode_ci,
226   `pubDate` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
227   PRIMARY KEY (`id`)
228 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
229 /*!40101 SET character_set_client = @saved_cs_client */;
232 -- Table structure for table `news_read`
235 DROP TABLE IF EXISTS `news_read`;
236 /*!40101 SET @saved_cs_client     = @@character_set_client */;
237 /*!40101 SET character_set_client = utf8 */;
238 CREATE TABLE `news_read` (
239   `id_news_feed` int(11) NOT NULL,
240   `id_user` int(11) NOT NULL,
241   `lastread` int(11) DEFAULT NULL,
242   `count_notread` int(11) NOT NULL
243 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
244 /*!40101 SET character_set_client = @saved_cs_client */;
247 -- Table structure for table `order`
250 DROP TABLE IF EXISTS `order`;
251 /*!40101 SET @saved_cs_client     = @@character_set_client */;
252 /*!40101 SET character_set_client = utf8 */;
253 CREATE TABLE `order` (
254   `id` int(11) NOT NULL AUTO_INCREMENT,
255   `id_position` int(11) NOT NULL,
256   `issued` int(11) NOT NULL DEFAULT '0',
257   `expire` int(11) NOT NULL DEFAULT '0',
258   `type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'buy',
259   `shares` double NOT NULL DEFAULT '0',
260   `limit` double NOT NULL DEFAULT '0',
261   `addon` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'none',
262   `exchange` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL,
263   `quote` double NOT NULL DEFAULT '0',
264   `provision` float DEFAULT NULL,
265   `courtage` float DEFAULT NULL,
266   `expense` float DEFAULT NULL,
267   `comment` mediumtext COLLATE utf8_unicode_ci,
268   `is_canceled` tinyint(1) DEFAULT NULL,
269   PRIMARY KEY (`id`)
270 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
271 /*!40101 SET character_set_client = @saved_cs_client */;
274 -- Table structure for table `portfolio`
277 DROP TABLE IF EXISTS `portfolio`;
278 /*!40101 SET @saved_cs_client     = @@character_set_client */;
279 /*!40101 SET character_set_client = utf8 */;
280 CREATE TABLE `portfolio` (
281   `id` int(11) NOT NULL AUTO_INCREMENT,
282   `id_user` int(11) NOT NULL,
283   `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
284   `type` varchar(0) COLLATE utf8_unicode_ci NOT NULL,
285   `date_created` int(11) NOT NULL,
286   `taxallowance` float DEFAULT NULL,
287   `order` tinyint(4) DEFAULT '0',
288   `comment` text COLLATE utf8_unicode_ci,
289   PRIMARY KEY (`id`)
290 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
291 /*!40101 SET character_set_client = @saved_cs_client */;
294 -- Table structure for table `position`
297 DROP TABLE IF EXISTS `position`;
298 /*!40101 SET @saved_cs_client     = @@character_set_client */;
299 /*!40101 SET character_set_client = utf8 */;
300 CREATE TABLE `position` (
301   `id` int(11) NOT NULL AUTO_INCREMENT,
302   `id_portfolio` int(11) NOT NULL,
303   `id_stock` int(11) NOT NULL,
304   `closed` int(11) DEFAULT '0',
305   `comment` text COLLATE utf8_unicode_ci NOT NULL,
306   PRIMARY KEY (`id`)
307 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
308 /*!40101 SET character_set_client = @saved_cs_client */;
311 -- Table structure for table `position_revision`
314 DROP TABLE IF EXISTS `position_revision`;
315 /*!40101 SET @saved_cs_client     = @@character_set_client */;
316 /*!40101 SET character_set_client = utf8 */;
317 CREATE TABLE `position_revision` (
318   `id_order` int(11) NOT NULL,
319   `id_position` int(11) NOT NULL,
320   `date` int(11) NOT NULL DEFAULT '0',
321   `shares` double NOT NULL DEFAULT '0',
322   `invested` float NOT NULL DEFAULT '0',
323   `id` int(11) NOT NULL AUTO_INCREMENT,
324   PRIMARY KEY (`id`)
325 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
326 /*!40101 SET character_set_client = @saved_cs_client */;
329 -- Table structure for table `quote`
332 DROP TABLE IF EXISTS `quote`;
333 /*!40101 SET @saved_cs_client     = @@character_set_client */;
334 /*!40101 SET character_set_client = utf8 */;
335 CREATE TABLE `quote` (
336   `id` int(11) NOT NULL AUTO_INCREMENT,
337   `id_stock` int(11) NOT NULL DEFAULT '0',
338   `date` int(11) NOT NULL DEFAULT '0',
339   `quote` double NOT NULL DEFAULT '0',
340   `low` double DEFAULT NULL,
341   `high` double DEFAULT NULL,
342   `volume` int(11) DEFAULT NULL,
343   `exchange` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
344   PRIMARY KEY (`id`)
345 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
346 /*!40101 SET character_set_client = @saved_cs_client */;
349 -- Table structure for table `quoterecord`
352 DROP TABLE IF EXISTS `quoterecord`;
353 /*!40101 SET @saved_cs_client     = @@character_set_client */;
354 /*!40101 SET character_set_client = utf8 */;
355 CREATE TABLE `quoterecord` (
356   `id` int(11) NOT NULL AUTO_INCREMENT,
357   `id_user` int(11) NOT NULL,
358   `id_stock` int(11) NOT NULL,
359   `id_quote` int(11) NOT NULL,
360   `created` int(11) NOT NULL,
361   `column` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
362   `comment` text COLLATE utf8_unicode_ci,
363   `is_pivotal_point` tinyint(1) DEFAULT NULL,
364   `is_signal` tinyint(1) DEFAULT NULL,
365   `is_uphit` tinyint(1) DEFAULT NULL,
366   `is_downhit` tinyint(1) DEFAULT NULL,
367   PRIMARY KEY (`id`)
368 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
369 /*!40101 SET character_set_client = @saved_cs_client */;
372 -- Table structure for table `quoterecord_rule`
375 DROP TABLE IF EXISTS `quoterecord_rule`;
376 /*!40101 SET @saved_cs_client     = @@character_set_client */;
377 /*!40101 SET character_set_client = utf8 */;
378 CREATE TABLE `quoterecord_rule` (
379   `id` int(11) NOT NULL AUTO_INCREMENT,
380   `id_user` int(11) NOT NULL,
381   `last_modified` int(11) DEFAULT NULL,
382   `order` int(11) DEFAULT NULL,
383   `related_columns` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
384   `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
385   `rule` text COLLATE utf8_unicode_ci,
386   PRIMARY KEY (`id`)
387 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
388 /*!40101 SET character_set_client = @saved_cs_client */;
391 -- Table structure for table `quoterecord_threshold`
394 DROP TABLE IF EXISTS `quoterecord_threshold`;
395 /*!40101 SET @saved_cs_client     = @@character_set_client */;
396 /*!40101 SET character_set_client = utf8 */;
397 CREATE TABLE `quoterecord_threshold` (
398   `id_user` int(11) NOT NULL,
399   `id_stock` int(11) NOT NULL,
400   `quote_sensitivity` double DEFAULT NULL,
401   `hit_sensitivity` double DEFAULT NULL,
402   `id` int(11) NOT NULL AUTO_INCREMENT,
403   PRIMARY KEY (`id`)
404 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
405 /*!40101 SET character_set_client = @saved_cs_client */;
408 -- Table structure for table `schema_migrations`
411 DROP TABLE IF EXISTS `schema_migrations`;
412 /*!40101 SET @saved_cs_client     = @@character_set_client */;
413 /*!40101 SET character_set_client = utf8 */;
414 CREATE TABLE `schema_migrations` (
415   `version` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
416   UNIQUE KEY `unique_schema_migrations` (`version`)
417 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
418 /*!40101 SET character_set_client = @saved_cs_client */;
421 -- Table structure for table `setting`
424 DROP TABLE IF EXISTS `setting`;
425 /*!40101 SET @saved_cs_client     = @@character_set_client */;
426 /*!40101 SET character_set_client = utf8 */;
427 CREATE TABLE `setting` (
428   `id` int(11) NOT NULL AUTO_INCREMENT,
429   `id_user` int(11) NOT NULL DEFAULT '0',
430   `type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'plugin',
431   `name` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
432   `var` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
433   `value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
434   PRIMARY KEY (`id`)
435 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
436 /*!40101 SET character_set_client = @saved_cs_client */;
439 -- Table structure for table `split`
442 DROP TABLE IF EXISTS `split`;
443 /*!40101 SET @saved_cs_client     = @@character_set_client */;
444 /*!40101 SET character_set_client = utf8 */;
445 CREATE TABLE `split` (
446   `id` int(11) NOT NULL AUTO_INCREMENT,
447   `id_stock` int(11) NOT NULL,
448   `date` int(11) NOT NULL,
449   `ratio` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
450   `comment` mediumtext COLLATE utf8_unicode_ci,
451   PRIMARY KEY (`id`),
452   UNIQUE KEY `SID` (`id_stock`,`date`)
453 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
454 /*!40101 SET character_set_client = @saved_cs_client */;
457 -- Table structure for table `stock`
460 DROP TABLE IF EXISTS `stock`;
461 /*!40101 SET @saved_cs_client     = @@character_set_client */;
462 /*!40101 SET character_set_client = utf8 */;
463 CREATE TABLE `stock` (
464   `id` int(11) NOT NULL AUTO_INCREMENT,
465   `id_stock_quotesource` int(11) DEFAULT NULL,
466   `id_stock_symbolextension` int(11) DEFAULT NULL,
467   `fetch_quote` tinyint(1) DEFAULT '1',
468   `symbol` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
469   `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '--',
470   `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
471   `comment` text COLLATE utf8_unicode_ci,
472   `annual_meeting` date NOT NULL,
473   PRIMARY KEY (`id`)
474 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
475 /*!40101 SET character_set_client = @saved_cs_client */;
478 -- Table structure for table `stock_quotesource`
481 DROP TABLE IF EXISTS `stock_quotesource`;
482 /*!40101 SET @saved_cs_client     = @@character_set_client */;
483 /*!40101 SET character_set_client = utf8 */;
484 CREATE TABLE `stock_quotesource` (
485   `id` int(11) NOT NULL AUTO_INCREMENT,
486   `source` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
487   PRIMARY KEY (`id`)
488 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
489 /*!40101 SET character_set_client = @saved_cs_client */;
492 -- Table structure for table `stock_symbolextension`
495 DROP TABLE IF EXISTS `stock_symbolextension`;
496 /*!40101 SET @saved_cs_client     = @@character_set_client */;
497 /*!40101 SET character_set_client = utf8 */;
498 CREATE TABLE `stock_symbolextension` (
499   `id` int(11) NOT NULL AUTO_INCREMENT,
500   `extension` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
501   `fullname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
502   PRIMARY KEY (`id`)
503 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
504 /*!40101 SET character_set_client = @saved_cs_client */;
507 -- Table structure for table `timetag`
510 DROP TABLE IF EXISTS `timetag`;
511 /*!40101 SET @saved_cs_client     = @@character_set_client */;
512 /*!40101 SET character_set_client = utf8 */;
513 CREATE TABLE `timetag` (
514   `id` int(11) NOT NULL AUTO_INCREMENT,
515   `id_user` int(11) NOT NULL,
516   `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
517   `description` text COLLATE utf8_unicode_ci NOT NULL,
518   `start` int(11) NOT NULL,
519   `end` int(11) NOT NULL,
520   PRIMARY KEY (`id`)
521 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
522 /*!40101 SET character_set_client = @saved_cs_client */;
525 -- Table structure for table `user`
528 DROP TABLE IF EXISTS `user`;
529 /*!40101 SET @saved_cs_client     = @@character_set_client */;
530 /*!40101 SET character_set_client = utf8 */;
531 CREATE TABLE `user` (
532   `id` int(11) NOT NULL AUTO_INCREMENT,
533   `login` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
534   `password` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
535   `is_admin` tinyint(1) NOT NULL DEFAULT '0',
536   `fullname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
537   `email` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
538   `comment` mediumtext COLLATE utf8_unicode_ci,
539   `password_digest` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
540   `password_auth_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
541   `password_reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
542   `password_reset_sent` datetime DEFAULT NULL,
543   PRIMARY KEY (`id`)
544 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
545 /*!40101 SET character_set_client = @saved_cs_client */;
548 -- Table structure for table `version`
551 DROP TABLE IF EXISTS `version`;
552 /*!40101 SET @saved_cs_client     = @@character_set_client */;
553 /*!40101 SET character_set_client = utf8 */;
554 CREATE TABLE `version` (
555   `version` tinyint(4) DEFAULT NULL
556 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
557 /*!40101 SET character_set_client = @saved_cs_client */;
558 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
560 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
561 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
562 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
563 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
564 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
565 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
566 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
568 -- Dump completed on 2014-08-31 11:44:02
569 INSERT INTO schema_migrations (version) VALUES ('0');
571 INSERT INTO schema_migrations (version) VALUES ('20121205175542');
573 INSERT INTO schema_migrations (version) VALUES ('20140614211945');
575 INSERT INTO schema_migrations (version) VALUES ('20140726211355');
577 INSERT INTO schema_migrations (version) VALUES ('20140729185743');
579 INSERT INTO schema_migrations (version) VALUES ('20140813095312');