Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

implementing error logs - stage 1

  • Loading branch information...
commit c5d84713cf0c3e560a89d407684c3fe23f15229a 1 parent 087bbff
Rafael Bugajski authored
2  Rakefile
@@ -4,4 +4,4 @@
4 4
5 5 require File.expand_path('../config/application', __FILE__)
6 6
7   -Tester2::Application.load_tasks
  7 +Ssite::Application.load_tasks
18 app/controllers/system/error_logs_controller.rb
... ... @@ -0,0 +1,18 @@
  1 +class ErrorLogsController < ApplicationController
  2 +#--------------------------------------------------------------------------------------------------------------------------------
  3 +
  4 + include RController
  5 +
  6 +#--------------------------------------------------------------------------------------------------------------------------------
  7 +#--------------------------------------------------------------------------------------------------------------------------------
  8 +
  9 + def filter_settings
  10 + @filter.set_sort_by_and_order('created_at','DESC')
  11 + end
  12 +
  13 + def do_before_each
  14 + end
  15 +
  16 +#--------------------------------------------------------------------------------------------------------------------------------
  17 +#--------------------------------------------------------------------------------------------------------------------------------
  18 +end
33 app/models/system/error_log.rb
... ... @@ -0,0 +1,33 @@
  1 +class ErrorLog < ActiveRecord::Base
  2 +#--------------------------------------------------------------------------------------------------------------------------------
  3 +#--------------------------------------------------------------------------------------------------------------------------------
  4 +
  5 + #--- associations
  6 + belongs_to :user
  7 +
  8 +#--------------------------------------------------------------------------------------------------------------------------------
  9 +
  10 + def self.generate(usr,obj,msg)
  11 + return unless obj
  12 + new_log = ErrorLog.create(
  13 +
  14 + :time => Time.now,
  15 +
  16 + :user_id => usr ? usr.id : 1,
  17 + :object_id => obj ? obj.id : nil,
  18 + :object_type => obj ? obj.class.name : nil,
  19 + :object_name => obj ? "#{obj.id} #{obj.class.name}" : nil,
  20 +
  21 + :message => msg,
  22 +
  23 + :controller_name => controller.controller_name,
  24 + :action_name => controller.action_name,
  25 +
  26 + :app_id => 1
  27 + )
  28 + return new_log
  29 + end
  30 +
  31 +#--------------------------------------------------------------------------------------------------------------------------------
  32 +#--------------------------------------------------------------------------------------------------------------------------------
  33 +end
26 db/migrate/20120121062559_create_events.rb
... ... @@ -1,26 +0,0 @@
1   -class CreateEvents < ActiveRecord::Migration
2   - def self.up
3   - create_table :event_logs do |t|
4   -
5   - t.column :time, :datetime
6   -
7   - t.column :user_id, :integer, :default => nil
8   - t.column :object_id, :integer, :default => nil
9   - t.column :object_type, :string, :default => nil
10   - t.column :object_name, :string, :default => nil
11   -
12   - t.column :action, :string, :default => nil
13   - t.column :result, :text
14   - t.column :comment, :text
15   -
16   - t.column :app_id, :integer, :default => nil # application id
17   - t.column :site_id, :integer, :default => 1
18   -
19   - t.timestamps
20   - end
21   - end
22   -
23   - def self.down
24   - drop_table :event_logs
25   - end
26   -end
49 db/migrate/20120121062559_create_logs.rb
... ... @@ -0,0 +1,49 @@
  1 +class CreateLogs < ActiveRecord::Migration
  2 + def self.up
  3 + create_table :event_logs do |t|
  4 +
  5 + t.column :time, :datetime
  6 +
  7 + t.column :user_id, :integer, :default => nil
  8 + t.column :object_id, :integer, :default => nil
  9 + t.column :object_type, :string, :default => nil
  10 + t.column :object_name, :string, :default => nil
  11 +
  12 + t.column :action, :string, :default => nil
  13 + t.column :result, :text
  14 + t.column :comment, :text
  15 +
  16 + t.column :app_id, :integer, :default => nil # application id
  17 + t.column :site_id, :integer, :default => 1
  18 +
  19 + t.timestamps
  20 + end
  21 + create_table :error_logs do |t|
  22 +
  23 + t.column :time, :datetime
  24 +
  25 + t.column :user_id, :integer, :default => nil
  26 + t.column :object_id, :integer, :default => nil
  27 + t.column :object_type, :string, :default => nil
  28 + t.column :object_name, :string, :default => nil
  29 +
  30 + t.column :controller_name, :string, :default => nil
  31 + t.column :action_name, :string, :default => nil
  32 + t.column :message, :text
  33 +
  34 + t.column :severity, :integer, :default => 0
  35 + t.column :active, :boolean, :default => true
  36 + t.column :sent, :boolean, :default => false
  37 +
  38 + t.column :app_id, :integer, :default => nil # application id
  39 + t.column :site_id, :integer, :default => 1
  40 +
  41 + t.timestamps
  42 + end
  43 + end
  44 +
  45 + def self.down
  46 + drop_table :event_logs
  47 + drop_table :error_logs
  48 + end
  49 +end
258 db/schema.rb
@@ -19,8 +19,8 @@
19 19 t.integer "position"
20 20 t.integer "created_by", :default => 1
21 21 t.integer "updated_by"
22   - t.datetime "created_at"
23   - t.datetime "updated_at"
  22 + t.datetime "created_at", :null => false
  23 + t.datetime "updated_at", :null => false
24 24 end
25 25
26 26 create_table "brand_menus", :force => true do |t|
@@ -30,8 +30,8 @@
30 30 t.integer "position"
31 31 t.integer "created_by", :default => 1
32 32 t.integer "updated_by"
33   - t.datetime "created_at"
34   - t.datetime "updated_at"
  33 + t.datetime "created_at", :null => false
  34 + t.datetime "updated_at", :null => false
35 35 end
36 36
37 37 create_table "brand_promos", :force => true do |t|
@@ -41,8 +41,8 @@
41 41 t.integer "position"
42 42 t.integer "created_by", :default => 1
43 43 t.integer "updated_by"
44   - t.datetime "created_at"
45   - t.datetime "updated_at"
  44 + t.datetime "created_at", :null => false
  45 + t.datetime "updated_at", :null => false
46 46 end
47 47
48 48 create_table "brand_styles", :force => true do |t|
@@ -52,8 +52,8 @@
52 52 t.integer "position"
53 53 t.integer "created_by", :default => 1
54 54 t.integer "updated_by"
55   - t.datetime "created_at"
56   - t.datetime "updated_at"
  55 + t.datetime "created_at", :null => false
  56 + t.datetime "updated_at", :null => false
57 57 end
58 58
59 59 create_table "brand_suggestions", :force => true do |t|
@@ -63,8 +63,8 @@
63 63 t.integer "position"
64 64 t.integer "created_by", :default => 1
65 65 t.integer "updated_by"
66   - t.datetime "created_at"
67   - t.datetime "updated_at"
  66 + t.datetime "created_at", :null => false
  67 + t.datetime "updated_at", :null => false
68 68 end
69 69
70 70 create_table "brands", :force => true do |t|
@@ -77,8 +77,8 @@
77 77 t.string "trace"
78 78 t.string "full"
79 79 t.integer "site_id"
80   - t.datetime "created_at"
81   - t.datetime "updated_at"
  80 + t.datetime "created_at", :null => false
  81 + t.datetime "updated_at", :null => false
82 82 end
83 83
84 84 create_table "categories", :force => true do |t|
@@ -91,8 +91,8 @@
91 91 t.string "trace"
92 92 t.string "full"
93 93 t.integer "site_id"
94   - t.datetime "created_at"
95   - t.datetime "updated_at"
  94 + t.datetime "created_at", :null => false
  95 + t.datetime "updated_at", :null => false
96 96 end
97 97
98 98 create_table "category_banners", :force => true do |t|
@@ -102,8 +102,8 @@
102 102 t.integer "position"
103 103 t.integer "created_by", :default => 1
104 104 t.integer "updated_by"
105   - t.datetime "created_at"
106   - t.datetime "updated_at"
  105 + t.datetime "created_at", :null => false
  106 + t.datetime "updated_at", :null => false
107 107 end
108 108
109 109 create_table "category_menus", :force => true do |t|
@@ -113,8 +113,8 @@
113 113 t.integer "position"
114 114 t.integer "created_by", :default => 1
115 115 t.integer "updated_by"
116   - t.datetime "created_at"
117   - t.datetime "updated_at"
  116 + t.datetime "created_at", :null => false
  117 + t.datetime "updated_at", :null => false
118 118 end
119 119
120 120 create_table "category_promos", :force => true do |t|
@@ -124,8 +124,8 @@
124 124 t.integer "position"
125 125 t.integer "created_by", :default => 1
126 126 t.integer "updated_by"
127   - t.datetime "created_at"
128   - t.datetime "updated_at"
  127 + t.datetime "created_at", :null => false
  128 + t.datetime "updated_at", :null => false
129 129 end
130 130
131 131 create_table "category_styles", :force => true do |t|
@@ -135,8 +135,8 @@
135 135 t.integer "position"
136 136 t.integer "created_by", :default => 1
137 137 t.integer "updated_by"
138   - t.datetime "created_at"
139   - t.datetime "updated_at"
  138 + t.datetime "created_at", :null => false
  139 + t.datetime "updated_at", :null => false
140 140 end
141 141
142 142 create_table "category_suggestions", :force => true do |t|
@@ -146,8 +146,8 @@
146 146 t.integer "position"
147 147 t.integer "created_by", :default => 1
148 148 t.integer "updated_by"
149   - t.datetime "created_at"
150   - t.datetime "updated_at"
  149 + t.datetime "created_at", :null => false
  150 + t.datetime "updated_at", :null => false
151 151 end
152 152
153 153 create_table "course_banners", :force => true do |t|
@@ -157,8 +157,8 @@
157 157 t.integer "position"
158 158 t.integer "created_by", :default => 1
159 159 t.integer "updated_by"
160   - t.datetime "created_at"
161   - t.datetime "updated_at"
  160 + t.datetime "created_at", :null => false
  161 + t.datetime "updated_at", :null => false
162 162 end
163 163
164 164 create_table "course_components", :force => true do |t|
@@ -168,8 +168,8 @@
168 168 t.integer "position"
169 169 t.integer "created_by", :default => 1
170 170 t.integer "updated_by"
171   - t.datetime "created_at"
172   - t.datetime "updated_at"
  171 + t.datetime "created_at", :null => false
  172 + t.datetime "updated_at", :null => false
173 173 end
174 174
175 175 create_table "course_documents", :force => true do |t|
@@ -179,8 +179,8 @@
179 179 t.integer "position"
180 180 t.integer "created_by", :default => 1
181 181 t.integer "updated_by"
182   - t.datetime "created_at"
183   - t.datetime "updated_at"
  182 + t.datetime "created_at", :null => false
  183 + t.datetime "updated_at", :null => false
184 184 end
185 185
186 186 create_table "course_images", :force => true do |t|
@@ -190,8 +190,8 @@
190 190 t.integer "position"
191 191 t.integer "created_by", :default => 1
192 192 t.integer "updated_by"
193   - t.datetime "created_at"
194   - t.datetime "updated_at"
  193 + t.datetime "created_at", :null => false
  194 + t.datetime "updated_at", :null => false
195 195 end
196 196
197 197 create_table "course_menus", :force => true do |t|
@@ -201,8 +201,8 @@
201 201 t.integer "position"
202 202 t.integer "created_by", :default => 1
203 203 t.integer "updated_by"
204   - t.datetime "created_at"
205   - t.datetime "updated_at"
  204 + t.datetime "created_at", :null => false
  205 + t.datetime "updated_at", :null => false
206 206 end
207 207
208 208 create_table "course_promos", :force => true do |t|
@@ -212,8 +212,8 @@
212 212 t.integer "position"
213 213 t.integer "created_by", :default => 1
214 214 t.integer "updated_by"
215   - t.datetime "created_at"
216   - t.datetime "updated_at"
  215 + t.datetime "created_at", :null => false
  216 + t.datetime "updated_at", :null => false
217 217 end
218 218
219 219 create_table "course_publications", :force => true do |t|
@@ -223,8 +223,8 @@
223 223 t.integer "position"
224 224 t.integer "created_by", :default => 1
225 225 t.integer "updated_by"
226   - t.datetime "created_at"
227   - t.datetime "updated_at"
  226 + t.datetime "created_at", :null => false
  227 + t.datetime "updated_at", :null => false
228 228 end
229 229
230 230 create_table "course_references", :force => true do |t|
@@ -234,8 +234,8 @@
234 234 t.integer "position"
235 235 t.integer "created_by", :default => 1
236 236 t.integer "updated_by"
237   - t.datetime "created_at"
238   - t.datetime "updated_at"
  237 + t.datetime "created_at", :null => false
  238 + t.datetime "updated_at", :null => false
239 239 end
240 240
241 241 create_table "course_relations", :force => true do |t|
@@ -245,8 +245,8 @@
245 245 t.integer "position"
246 246 t.integer "created_by", :default => 1
247 247 t.integer "updated_by"
248   - t.datetime "created_at"
249   - t.datetime "updated_at"
  248 + t.datetime "created_at", :null => false
  249 + t.datetime "updated_at", :null => false
250 250 end
251 251
252 252 create_table "course_styles", :force => true do |t|
@@ -256,8 +256,8 @@
256 256 t.integer "position"
257 257 t.integer "created_by", :default => 1
258 258 t.integer "updated_by"
259   - t.datetime "created_at"
260   - t.datetime "updated_at"
  259 + t.datetime "created_at", :null => false
  260 + t.datetime "updated_at", :null => false
261 261 end
262 262
263 263 create_table "course_suggestions", :force => true do |t|
@@ -267,8 +267,8 @@
267 267 t.integer "position"
268 268 t.integer "created_by", :default => 1
269 269 t.integer "updated_by"
270   - t.datetime "created_at"
271   - t.datetime "updated_at"
  270 + t.datetime "created_at", :null => false
  271 + t.datetime "updated_at", :null => false
272 272 end
273 273
274 274 create_table "course_vdeos", :force => true do |t|
@@ -278,8 +278,8 @@
278 278 t.integer "position"
279 279 t.integer "created_by", :default => 1
280 280 t.integer "updated_by"
281   - t.datetime "created_at"
282   - t.datetime "updated_at"
  281 + t.datetime "created_at", :null => false
  282 + t.datetime "updated_at", :null => false
283 283 end
284 284
285 285 create_table "courses", :force => true do |t|
@@ -342,8 +342,8 @@
342 342 t.integer "released_by", :default => 1
343 343 t.integer "created_by", :default => 1
344 344 t.integer "updated_by"
345   - t.datetime "created_at"
346   - t.datetime "updated_at"
  345 + t.datetime "created_at", :null => false
  346 + t.datetime "updated_at", :null => false
347 347 end
348 348
349 349 create_table "document_types", :force => true do |t|
@@ -354,8 +354,8 @@
354 354 t.string "file_path"
355 355 t.integer "created_by", :default => 1
356 356 t.integer "updated_by"
357   - t.datetime "created_at"
358   - t.datetime "updated_at"
  357 + t.datetime "created_at", :null => false
  358 + t.datetime "updated_at", :null => false
359 359 end
360 360
361 361 create_table "documents", :force => true do |t|
@@ -411,8 +411,26 @@
411 411 t.integer "released_by", :default => 1
412 412 t.integer "created_by", :default => 1
413 413 t.integer "updated_by"
414   - t.datetime "created_at"
415   - t.datetime "updated_at"
  414 + t.datetime "created_at", :null => false
  415 + t.datetime "updated_at", :null => false
  416 + end
  417 +
  418 + create_table "error_logs", :force => true do |t|
  419 + t.datetime "time"
  420 + t.integer "user_id"
  421 + t.integer "object_id"
  422 + t.string "object_type"
  423 + t.string "object_name"
  424 + t.string "controller_name"
  425 + t.string "action_name"
  426 + t.text "message"
  427 + t.integer "severity", :default => 0
  428 + t.boolean "active", :default => true
  429 + t.boolean "sent", :default => false
  430 + t.integer "app_id"
  431 + t.integer "site_id", :default => 1
  432 + t.datetime "created_at", :null => false
  433 + t.datetime "updated_at", :null => false
416 434 end
417 435
418 436 create_table "event_logs", :force => true do |t|
@@ -426,8 +444,8 @@
426 444 t.text "comment"
427 445 t.integer "app_id"
428 446 t.integer "site_id", :default => 1
429   - t.datetime "created_at"
430   - t.datetime "updated_at"
  447 + t.datetime "created_at", :null => false
  448 + t.datetime "updated_at", :null => false
431 449 end
432 450
433 451 create_table "page_banners", :force => true do |t|
@@ -437,8 +455,8 @@
437 455 t.integer "position"
438 456 t.integer "created_by", :default => 1
439 457 t.integer "updated_by"
440   - t.datetime "created_at"
441   - t.datetime "updated_at"
  458 + t.datetime "created_at", :null => false
  459 + t.datetime "updated_at", :null => false
442 460 end
443 461
444 462 create_table "page_documents", :force => true do |t|
@@ -448,8 +466,8 @@
448 466 t.integer "position"
449 467 t.integer "created_by", :default => 1
450 468 t.integer "updated_by"
451   - t.datetime "created_at"
452   - t.datetime "updated_at"
  469 + t.datetime "created_at", :null => false
  470 + t.datetime "updated_at", :null => false
453 471 end
454 472
455 473 create_table "page_images", :force => true do |t|
@@ -459,8 +477,8 @@
459 477 t.integer "position"
460 478 t.integer "created_by", :default => 1
461 479 t.integer "updated_by"
462   - t.datetime "created_at"
463   - t.datetime "updated_at"
  480 + t.datetime "created_at", :null => false
  481 + t.datetime "updated_at", :null => false
464 482 end
465 483
466 484 create_table "page_menus", :force => true do |t|
@@ -470,8 +488,8 @@
470 488 t.integer "position"
471 489 t.integer "created_by", :default => 1
472 490 t.integer "updated_by"
473   - t.datetime "created_at"
474   - t.datetime "updated_at"
  491 + t.datetime "created_at", :null => false
  492 + t.datetime "updated_at", :null => false
475 493 end
476 494
477 495 create_table "page_promos", :force => true do |t|
@@ -481,8 +499,8 @@
481 499 t.integer "position"
482 500 t.integer "created_by", :default => 1
483 501 t.integer "updated_by"
484   - t.datetime "created_at"
485   - t.datetime "updated_at"
  502 + t.datetime "created_at", :null => false
  503 + t.datetime "updated_at", :null => false
486 504 end
487 505
488 506 create_table "page_publications", :force => true do |t|
@@ -492,8 +510,8 @@
492 510 t.integer "position"
493 511 t.integer "created_by", :default => 1
494 512 t.integer "updated_by"
495   - t.datetime "created_at"
496   - t.datetime "updated_at"
  513 + t.datetime "created_at", :null => false
  514 + t.datetime "updated_at", :null => false
497 515 end
498 516
499 517 create_table "page_styles", :force => true do |t|
@@ -503,8 +521,8 @@
503 521 t.integer "position"
504 522 t.integer "created_by", :default => 1
505 523 t.integer "updated_by"
506   - t.datetime "created_at"
507   - t.datetime "updated_at"
  524 + t.datetime "created_at", :null => false
  525 + t.datetime "updated_at", :null => false
508 526 end
509 527
510 528 create_table "page_vdeos", :force => true do |t|
@@ -514,8 +532,8 @@
514 532 t.integer "position"
515 533 t.integer "created_by", :default => 1
516 534 t.integer "updated_by"
517   - t.datetime "created_at"
518   - t.datetime "updated_at"
  535 + t.datetime "created_at", :null => false
  536 + t.datetime "updated_at", :null => false
519 537 end
520 538
521 539 create_table "product_banners", :force => true do |t|
@@ -525,8 +543,8 @@
525 543 t.integer "position"
526 544 t.integer "created_by", :default => 1
527 545 t.integer "updated_by"
528   - t.datetime "created_at"
529   - t.datetime "updated_at"
  546 + t.datetime "created_at", :null => false
  547 + t.datetime "updated_at", :null => false
530 548 end
531 549
532 550 create_table "product_components", :force => true do |t|
@@ -536,8 +554,8 @@
536 554 t.integer "position"
537 555 t.integer "created_by", :default => 1
538 556 t.integer "updated_by"
539   - t.datetime "created_at"
540   - t.datetime "updated_at"
  557 + t.datetime "created_at", :null => false
  558 + t.datetime "updated_at", :null => false
541 559 end
542 560
543 561 create_table "product_documents", :force => true do |t|
@@ -547,8 +565,8 @@
547 565 t.integer "position"
548 566 t.integer "created_by", :default => 1
549 567 t.integer "updated_by"
550   - t.datetime "created_at"
551   - t.datetime "updated_at"
  568 + t.datetime "created_at", :null => false
  569 + t.datetime "updated_at", :null => false
552 570 end
553 571
554 572 create_table "product_images", :force => true do |t|
@@ -558,8 +576,8 @@
558 576 t.integer "position"
559 577 t.integer "created_by", :default => 1
560 578 t.integer "updated_by"
561   - t.datetime "created_at"
562   - t.datetime "updated_at"
  579 + t.datetime "created_at", :null => false
  580 + t.datetime "updated_at", :null => false
563 581 end
564 582
565 583 create_table "product_menus", :force => true do |t|
@@ -569,8 +587,8 @@
569 587 t.integer "position"
570 588 t.integer "created_by", :default => 1
571 589 t.integer "updated_by"
572   - t.datetime "created_at"
573   - t.datetime "updated_at"
  590 + t.datetime "created_at", :null => false
  591 + t.datetime "updated_at", :null => false
574 592 end
575 593
576 594 create_table "product_promos", :force => true do |t|
@@ -580,8 +598,8 @@
580 598 t.integer "position"
581 599 t.integer "created_by", :default => 1
582 600 t.integer "updated_by"
583   - t.datetime "created_at"
584   - t.datetime "updated_at"
  601 + t.datetime "created_at", :null => false
  602 + t.datetime "updated_at", :null => false
585 603 end
586 604
587 605 create_table "product_publications", :force => true do |t|
@@ -591,8 +609,8 @@
591 609 t.integer "position"
592 610 t.integer "created_by", :default => 1
593 611 t.integer "updated_by"
594   - t.datetime "created_at"
595   - t.datetime "updated_at"
  612 + t.datetime "created_at", :null => false
  613 + t.datetime "updated_at", :null => false
596 614 end
597 615
598 616 create_table "product_references", :force => true do |t|
@@ -602,8 +620,8 @@
602 620 t.integer "position"
603 621 t.integer "created_by", :default => 1
604 622 t.integer "updated_by"
605   - t.datetime "created_at"
606   - t.datetime "updated_at"
  623 + t.datetime "created_at", :null => false
  624 + t.datetime "updated_at", :null => false
607 625 end
608 626
609 627 create_table "product_relations", :force => true do |t|
@@ -613,8 +631,8 @@
613 631 t.integer "position"
614 632 t.integer "created_by", :default => 1
615 633 t.integer "updated_by"
616   - t.datetime "created_at"
617   - t.datetime "updated_at"
  634 + t.datetime "created_at", :null => false
  635 + t.datetime "updated_at", :null => false
618 636 end
619 637
620 638 create_table "product_styles", :force => true do |t|
@@ -624,8 +642,8 @@
624 642 t.integer "position"
625 643 t.integer "created_by", :default => 1
626 644 t.integer "updated_by"
627   - t.datetime "created_at"
628   - t.datetime "updated_at"
  645 + t.datetime "created_at", :null => false
  646 + t.datetime "updated_at", :null => false
629 647 end
630 648
631 649 create_table "product_suggestions", :force => true do |t|
@@ -635,8 +653,8 @@
635 653 t.integer "position"
636 654 t.integer "created_by", :default => 1
637 655 t.integer "updated_by"
638   - t.datetime "created_at"
639   - t.datetime "updated_at"
  656 + t.datetime "created_at", :null => false
  657 + t.datetime "updated_at", :null => false
640 658 end
641 659
642 660 create_table "product_vdeos", :force => true do |t|
@@ -646,8 +664,8 @@
646 664 t.integer "position"
647 665 t.integer "created_by", :default => 1
648 666 t.integer "updated_by"
649   - t.datetime "created_at"
650   - t.datetime "updated_at"
  667 + t.datetime "created_at", :null => false
  668 + t.datetime "updated_at", :null => false
651 669 end
652 670
653 671 create_table "products", :force => true do |t|
@@ -722,8 +740,8 @@
722 740 t.integer "released_by", :default => 1
723 741 t.integer "created_by", :default => 1
724 742 t.integer "updated_by"
725   - t.datetime "created_at"
726   - t.datetime "updated_at"
  743 + t.datetime "created_at", :null => false
  744 + t.datetime "updated_at", :null => false
727 745 end
728 746
729 747 create_table "releases", :force => true do |t|
@@ -735,8 +753,8 @@
735 753 t.text "description"
736 754 t.integer "app_id"
737 755 t.integer "site_id", :default => 1
738   - t.datetime "created_at"
739   - t.datetime "updated_at"
  756 + t.datetime "created_at", :null => false
  757 + t.datetime "updated_at", :null => false
740 758 end
741 759
742 760 create_table "skus", :force => true do |t|
@@ -775,8 +793,8 @@
775 793 t.integer "released_by", :default => 1
776 794 t.integer "created_by", :default => 1
777 795 t.integer "updated_by"
778   - t.datetime "created_at"
779   - t.datetime "updated_at"
  796 + t.datetime "created_at", :null => false
  797 + t.datetime "updated_at", :null => false
780 798 end
781 799
782 800 create_table "survey_banners", :force => true do |t|
@@ -786,8 +804,8 @@
786 804 t.integer "position"
787 805 t.integer "created_by", :default => 1
788 806 t.integer "updated_by"
789   - t.datetime "created_at"
790   - t.datetime "updated_at"
  807 + t.datetime "created_at", :null => false
  808 + t.datetime "updated_at", :null => false
791 809 end
792 810
793 811 create_table "survey_documents", :force => true do |t|
@@ -797,8 +815,8 @@
797 815 t.integer "position"
798 816 t.integer "created_by", :default => 1
799 817 t.integer "updated_by"
800   - t.datetime "created_at"
801   - t.datetime "updated_at"
  818 + t.datetime "created_at", :null => false
  819 + t.datetime "updated_at", :null => false
802 820 end
803 821
804 822 create_table "survey_images", :force => true do |t|
@@ -808,8 +826,8 @@
808 826 t.integer "position"
809 827 t.integer "created_by", :default => 1
810 828 t.integer "updated_by"
811   - t.datetime "created_at"
812   - t.datetime "updated_at"
  829 + t.datetime "created_at", :null => false
  830 + t.datetime "updated_at", :null => false
813 831 end
814 832
815 833 create_table "survey_menus", :force => true do |t|
@@ -819,8 +837,8 @@
819 837 t.integer "position"
820 838 t.integer "created_by", :default => 1
821 839 t.integer "updated_by"
822   - t.datetime "created_at"
823   - t.datetime "updated_at"
  840 + t.datetime "created_at", :null => false
  841 + t.datetime "updated_at", :null => false
824 842 end
825 843
826 844 create_table "survey_promos", :force => true do |t|
@@ -830,8 +848,8 @@
830 848 t.integer "position"
831 849 t.integer "created_by", :default => 1
832 850 t.integer "updated_by"
833   - t.datetime "created_at"
834   - t.datetime "updated_at"
  851 + t.datetime "created_at", :null => false
  852 + t.datetime "updated_at", :null => false
835 853 end
836 854
837 855 create_table "survey_publications", :force => true do |t|
@@ -841,8 +859,8 @@
841 859 t.integer "position"
842 860 t.integer "created_by", :default => 1
843 861 t.integer "updated_by"
844   - t.datetime "created_at"
845   - t.datetime "updated_at"
  862 + t.datetime "created_at", :null => false
  863 + t.datetime "updated_at", :null => false
846 864 end
847 865
848 866 create_table "survey_styles", :force => true do |t|
@@ -852,8 +870,8 @@
852 870 t.integer "position"
853 871 t.integer "created_by", :default => 1
854 872 t.integer "updated_by"
855   - t.datetime "created_at"
856   - t.datetime "updated_at"
  873 + t.datetime "created_at", :null => false
  874 + t.datetime "updated_at", :null => false
857 875 end
858 876
859 877 create_table "survey_vdeos", :force => true do |t|
@@ -863,8 +881,8 @@
863 881 t.integer "position"
864 882 t.integer "created_by", :default => 1
865 883 t.integer "updated_by"
866   - t.datetime "created_at"
867   - t.datetime "updated_at"
  884 + t.datetime "created_at", :null => false
  885 + t.datetime "updated_at", :null => false
868 886 end
869 887
870 888 create_table "users", :force => true do |t|
@@ -901,8 +919,8 @@
901 919 t.boolean "active", :default => true
902 920 t.boolean "editable", :default => true
903 921 t.string "sites_str"
904   - t.datetime "created_at"
905   - t.datetime "updated_at"
  922 + t.datetime "created_at", :null => false
  923 + t.datetime "updated_at", :null => false
906 924 end
907 925
908 926 add_index "users", ["email"], :name => "index_users_on_email", :unique => true

0 comments on commit c5d8471

Please sign in to comment.
Something went wrong with that request. Please try again.