meta_notification 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +35 -0
  5. data/app/assets/javascripts/meta_notification/application.js +13 -0
  6. data/app/assets/stylesheets/meta_notification/application.css +15 -0
  7. data/app/controllers/meta_notification/api/v1/notification_settings_controller.rb +24 -0
  8. data/app/controllers/meta_notification/api/v1/notification_templates_controller.rb +61 -0
  9. data/app/controllers/meta_notification/api/v1/notification_types_controller.rb +64 -0
  10. data/app/controllers/meta_notification/api/v1/notifications_controller.rb +22 -0
  11. data/app/controllers/meta_notification/api/v1/user_notification_settings_controller.rb +20 -0
  12. data/app/controllers/meta_notification/api/v1/user_notifications_controller.rb +75 -0
  13. data/app/controllers/meta_notification/application_controller.rb +4 -0
  14. data/app/helpers/meta_notification/application_helper.rb +4 -0
  15. data/app/models/meta_notification/notification.rb +12 -0
  16. data/app/models/meta_notification/notification_setting.rb +9 -0
  17. data/app/models/meta_notification/notification_template.rb +17 -0
  18. data/app/models/meta_notification/notification_type.rb +22 -0
  19. data/app/models/meta_notification/user_notification.rb +6 -0
  20. data/app/models/meta_notification/user_notification_setting.rb +10 -0
  21. data/app/views/layouts/meta_notification/application.html.erb +14 -0
  22. data/app/views/meta_notification/api/v1/notification_settings/create.html.erb +2 -0
  23. data/app/views/meta_notification/api/v1/notification_settings/destroy.html.erb +2 -0
  24. data/app/views/meta_notification/api/v1/notification_settings/index.html.erb +2 -0
  25. data/app/views/meta_notification/api/v1/notification_settings/show.html.erb +2 -0
  26. data/app/views/meta_notification/api/v1/notification_settings/update.html.erb +2 -0
  27. data/app/views/meta_notification/api/v1/notification_templates/create.html.erb +2 -0
  28. data/app/views/meta_notification/api/v1/notification_templates/destroy.html.erb +2 -0
  29. data/app/views/meta_notification/api/v1/notification_templates/index.html.erb +2 -0
  30. data/app/views/meta_notification/api/v1/notification_templates/show.html.erb +2 -0
  31. data/app/views/meta_notification/api/v1/notification_templates/update.html.erb +2 -0
  32. data/app/views/meta_notification/api/v1/notification_types/create.html.erb +2 -0
  33. data/app/views/meta_notification/api/v1/notification_types/destroy.html.erb +2 -0
  34. data/app/views/meta_notification/api/v1/notification_types/index.html.erb +2 -0
  35. data/app/views/meta_notification/api/v1/notification_types/show.html.erb +2 -0
  36. data/app/views/meta_notification/api/v1/notification_types/update.html.erb +2 -0
  37. data/app/views/meta_notification/api/v1/notifications/resource_notification.rabl +14 -0
  38. data/app/views/meta_notification/api/v1/user_notification_settings/create.html.erb +2 -0
  39. data/app/views/meta_notification/api/v1/user_notification_settings/destroy.html.erb +2 -0
  40. data/app/views/meta_notification/api/v1/user_notification_settings/index.html.erb +2 -0
  41. data/app/views/meta_notification/api/v1/user_notification_settings/show.html.erb +2 -0
  42. data/app/views/meta_notification/api/v1/user_notification_settings/update.html.erb +2 -0
  43. data/app/views/meta_notification/api/v1/user_notifications/message_notifications.rabl +0 -0
  44. data/app/views/meta_notification/api/v1/user_notifications/notifications.rabl +21 -0
  45. data/config/routes.rb +45 -0
  46. data/db/migrate/20160615074820_create_meta_notification_notification_types.rb +15 -0
  47. data/db/migrate/20160618094218_create_meta_notification_notification_templates.rb +19 -0
  48. data/db/migrate/20160619133533_create_meta_notification_notifications.rb +14 -0
  49. data/db/migrate/20160620015754_create_meta_notification_user_notifications.rb +12 -0
  50. data/db/migrate/20160620020944_create_meta_notification_notification_settings.rb +10 -0
  51. data/db/migrate/20160620052742_create_meta_notification_user_notification_settings.rb +12 -0
  52. data/db/migrate/20160727124414_add_attachment_attachment_to_mn_notifications.rb +11 -0
  53. data/lib/api_constraints.rb +10 -0
  54. data/lib/meta_notification/engine.rb +15 -0
  55. data/lib/meta_notification/version.rb +3 -0
  56. data/lib/meta_notification.rb +7 -0
  57. data/lib/meta_notification_authority.rb +39 -0
  58. data/lib/mn_authorizers/notification_setting_authorizer.rb +28 -0
  59. data/lib/mn_authorizers/notification_template_authorizer.rb +28 -0
  60. data/lib/mn_authorizers/notification_type_authorizer.rb +28 -0
  61. data/lib/mn_authorizers/test_authorizer.rb +11 -0
  62. data/lib/mn_authorizers/user_notification_authorizer.rb +28 -0
  63. data/lib/tasks/meta_notification_tasks.rake +4 -0
  64. data/spec/controllers/meta_notification/api/v1/notification_settings_controller_spec.rb +42 -0
  65. data/spec/controllers/meta_notification/api/v1/notification_templates_controller_spec.rb +42 -0
  66. data/spec/controllers/meta_notification/api/v1/notification_types_controller_spec.rb +42 -0
  67. data/spec/controllers/meta_notification/api/v1/notifications_controller_spec.rb +7 -0
  68. data/spec/controllers/meta_notification/api/v1/user_notification_settings_controller_spec.rb +42 -0
  69. data/spec/controllers/meta_notification/api/v1/user_notifications_controller_spec.rb +42 -0
  70. data/spec/dummy/README.rdoc +28 -0
  71. data/spec/dummy/Rakefile +6 -0
  72. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  73. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  74. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  75. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  76. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  77. data/spec/dummy/bin/bundle +3 -0
  78. data/spec/dummy/bin/rails +4 -0
  79. data/spec/dummy/bin/rake +4 -0
  80. data/spec/dummy/bin/setup +29 -0
  81. data/spec/dummy/config/application.rb +33 -0
  82. data/spec/dummy/config/boot.rb +5 -0
  83. data/spec/dummy/config/database.yml +54 -0
  84. data/spec/dummy/config/environment.rb +5 -0
  85. data/spec/dummy/config/environments/development.rb +41 -0
  86. data/spec/dummy/config/environments/production.rb +79 -0
  87. data/spec/dummy/config/environments/test.rb +42 -0
  88. data/spec/dummy/config/initializers/assets.rb +11 -0
  89. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  90. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  91. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  92. data/spec/dummy/config/initializers/inflections.rb +16 -0
  93. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  94. data/spec/dummy/config/initializers/session_store.rb +3 -0
  95. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  96. data/spec/dummy/config/locales/en.yml +23 -0
  97. data/spec/dummy/config/routes.rb +4 -0
  98. data/spec/dummy/config/secrets.yml +22 -0
  99. data/spec/dummy/config.ru +4 -0
  100. data/spec/dummy/db/schema.rb +91 -0
  101. data/spec/dummy/log/development.log +264 -0
  102. data/spec/dummy/log/test.log +1192 -0
  103. data/spec/dummy/public/404.html +67 -0
  104. data/spec/dummy/public/422.html +67 -0
  105. data/spec/dummy/public/500.html +66 -0
  106. data/spec/dummy/public/favicon.ico +0 -0
  107. data/spec/factories/meta_notification/notification_settings.rb +28 -0
  108. data/spec/factories/meta_notification/notification_templates.rb +59 -0
  109. data/spec/factories/meta_notification/notification_types.rb +35 -0
  110. data/spec/factories/meta_notification/notifications.rb +80 -0
  111. data/spec/factories/meta_notification/user_notification_settings.rb +34 -0
  112. data/spec/factories/meta_notification/user_notifications.rb +35 -0
  113. data/spec/models/meta_notification/notification_setting_spec.rb +31 -0
  114. data/spec/models/meta_notification/notification_spec.rb +39 -0
  115. data/spec/models/meta_notification/notification_template_spec.rb +37 -0
  116. data/spec/models/meta_notification/notification_type_spec.rb +36 -0
  117. data/spec/models/meta_notification/user_notification_setting_spec.rb +31 -0
  118. data/spec/models/meta_notification/user_notification_spec.rb +28 -0
  119. data/spec/rails_helper.rb +60 -0
  120. data/spec/spec_helper.rb +92 -0
  121. data/spec/views/meta_notification/api/v1/notification_settings/create.html.erb_spec.rb +5 -0
  122. data/spec/views/meta_notification/api/v1/notification_settings/destroy.html.erb_spec.rb +5 -0
  123. data/spec/views/meta_notification/api/v1/notification_settings/index.html.erb_spec.rb +5 -0
  124. data/spec/views/meta_notification/api/v1/notification_settings/show.html.erb_spec.rb +5 -0
  125. data/spec/views/meta_notification/api/v1/notification_settings/update.html.erb_spec.rb +5 -0
  126. data/spec/views/meta_notification/api/v1/notification_templates/create.html.erb_spec.rb +5 -0
  127. data/spec/views/meta_notification/api/v1/notification_templates/destroy.html.erb_spec.rb +5 -0
  128. data/spec/views/meta_notification/api/v1/notification_templates/index.html.erb_spec.rb +5 -0
  129. data/spec/views/meta_notification/api/v1/notification_templates/show.html.erb_spec.rb +5 -0
  130. data/spec/views/meta_notification/api/v1/notification_templates/update.html.erb_spec.rb +5 -0
  131. data/spec/views/meta_notification/api/v1/notification_types/create.html.erb_spec.rb +5 -0
  132. data/spec/views/meta_notification/api/v1/notification_types/destroy.html.erb_spec.rb +5 -0
  133. data/spec/views/meta_notification/api/v1/notification_types/index.html.erb_spec.rb +5 -0
  134. data/spec/views/meta_notification/api/v1/notification_types/show.html.erb_spec.rb +5 -0
  135. data/spec/views/meta_notification/api/v1/notification_types/update.html.erb_spec.rb +5 -0
  136. data/spec/views/meta_notification/api/v1/user_notification_settings/create.html.erb_spec.rb +5 -0
  137. data/spec/views/meta_notification/api/v1/user_notification_settings/destroy.html.erb_spec.rb +5 -0
  138. data/spec/views/meta_notification/api/v1/user_notification_settings/index.html.erb_spec.rb +5 -0
  139. data/spec/views/meta_notification/api/v1/user_notification_settings/show.html.erb_spec.rb +5 -0
  140. data/spec/views/meta_notification/api/v1/user_notification_settings/update.html.erb_spec.rb +5 -0
  141. data/spec/views/meta_notification/api/v1/user_notifications/create.html.erb_spec.rb +5 -0
  142. data/spec/views/meta_notification/api/v1/user_notifications/destroy.html.erb_spec.rb +5 -0
  143. data/spec/views/meta_notification/api/v1/user_notifications/index.html.erb_spec.rb +5 -0
  144. data/spec/views/meta_notification/api/v1/user_notifications/show.html.erb_spec.rb +5 -0
  145. data/spec/views/meta_notification/api/v1/user_notifications/update.html.erb_spec.rb +5 -0
  146. metadata +355 -0
@@ -0,0 +1,264 @@
1
+  (163.6ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
2
+  (290.6ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
3
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT `schema_migrations`.* FROM `schema_migrations`
4
+ Migrating to CreateMetaNotificationNotificationTypes (20160620071720)
5
+  (84.8ms) CREATE TABLE `mn_notification_types` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL, `display_name` varchar(255), `created_by_id` int(11) NOT NULL, `updated_by_id` int(11) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
6
+  (0.2ms) BEGIN
7
+ SQL (1.4ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160620071720')
8
+  (89.7ms) COMMIT
9
+ Migrating to CreateMetaNotificationNotificationTemplates (20160620071721)
10
+  (82.3ms) CREATE TABLE `mn_notification_templates` (`id` int(11) auto_increment PRIMARY KEY, `notification_type_id` int(11) NOT NULL, `in_app` varchar(255), `mobile` varchar(255), `push` varchar(255), `email` text, `sms` varchar(255), `email_subject` varchar(255), `resource_id` int(11), `resource_type` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
11
+  (174.0ms) CREATE UNIQUE INDEX `unique_type_resource_index` ON `mn_notification_templates` (`notification_type_id`, `resource_type`, `resource_id`) 
12
+  (159.0ms) CREATE INDEX `resource_index` ON `mn_notification_templates` (`resource_type`, `resource_id`)
13
+  (0.1ms) BEGIN
14
+ SQL (0.2ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160620071721')
15
+  (106.3ms) COMMIT
16
+ Migrating to CreateMetaNotificationNotifications (20160620071722)
17
+  (89.4ms) CREATE TABLE `mn_notifications` (`id` int(11) auto_increment PRIMARY KEY, `notification_template_id` int(11) NOT NULL, `in_app` text NOT NULL, `mobile` text NOT NULL, `resource_type` varchar(255), `resource_id` int(11), `created_by_id` int(11) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_mn_notifications_on_notification_template_id` (`notification_template_id`) , INDEX `index_mn_notifications_on_created_by_id` (`created_by_id`) ) ENGINE=InnoDB
18
+  (0.3ms) BEGIN
19
+ SQL (0.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160620071722')
20
+  (46.5ms) COMMIT
21
+ Migrating to CreateMetaNotificationUserNotifications (20160620071723)
22
+  (81.0ms) CREATE TABLE `mn_user_notifications` (`id` int(11) auto_increment PRIMARY KEY, `user_id` int(11) NOT NULL, `notification_id` int(11) NOT NULL, `is_read` tinyint(1) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_mn_user_notifications_on_user_id` (`user_id`) , INDEX `index_mn_user_notifications_on_notification_id` (`notification_id`) ) ENGINE=InnoDB
23
+  (0.1ms) BEGIN
24
+ SQL (0.2ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160620071723')
25
+  (48.3ms) COMMIT
26
+ Migrating to CreateMetaNotificationNotificationSettings (20160620071724)
27
+  (89.4ms) CREATE TABLE `mn_notification_settings` (`id` int(11) auto_increment PRIMARY KEY, `notification_type_id` int(11) NOT NULL, `is_mute` tinyint(1) DEFAULT 0 NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
28
+  (0.1ms) BEGIN
29
+ SQL (0.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160620071724')
30
+  (46.9ms) COMMIT
31
+ Migrating to CreateMetaNotificationUserNotificationSettings (20160620071725)
32
+  (81.6ms) CREATE TABLE `mn_user_notification_settings` (`id` int(11) auto_increment PRIMARY KEY, `user_id` int(11) NOT NULL, `notification_type_id` int(11) NOT NULL, `is_mute` tinyint(1) DEFAULT 0 NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_mn_user_notification_settings_on_notification_type_id` (`notification_type_id`) ) ENGINE=InnoDB
33
+  (165.9ms) CREATE UNIQUE INDEX `unique_user_notification_type_index` ON `mn_user_notification_settings` (`user_id`, `notification_type_id`) 
34
+  (0.2ms) BEGIN
35
+ SQL (0.3ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160620071725')
36
+  (55.8ms) COMMIT
37
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT `schema_migrations`.* FROM `schema_migrations`
38
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
39
+ ,fk.referenced_column_name as 'primary_key'
40
+ ,fk.column_name as 'column'
41
+ ,fk.constraint_name as 'name'
42
+ FROM information_schema.key_column_usage fk
43
+ WHERE fk.referenced_column_name is not null
44
+ AND fk.table_schema = 'dummy_development'
45
+ AND fk.table_name = 'mn_notification_settings'
46
+
47
+  (0.1ms) SHOW CREATE TABLE `mn_notification_settings`
48
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
49
+ ,fk.referenced_column_name as 'primary_key'
50
+ ,fk.column_name as 'column'
51
+ ,fk.constraint_name as 'name'
52
+ FROM information_schema.key_column_usage fk
53
+ WHERE fk.referenced_column_name is not null
54
+ AND fk.table_schema = 'dummy_development'
55
+ AND fk.table_name = 'mn_notification_templates'
56
+
57
+  (0.2ms) SHOW CREATE TABLE `mn_notification_templates`
58
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
59
+ ,fk.referenced_column_name as 'primary_key'
60
+ ,fk.column_name as 'column'
61
+ ,fk.constraint_name as 'name'
62
+ FROM information_schema.key_column_usage fk
63
+ WHERE fk.referenced_column_name is not null
64
+ AND fk.table_schema = 'dummy_development'
65
+ AND fk.table_name = 'mn_notification_types'
66
+
67
+  (0.1ms) SHOW CREATE TABLE `mn_notification_types`
68
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
69
+ ,fk.referenced_column_name as 'primary_key'
70
+ ,fk.column_name as 'column'
71
+ ,fk.constraint_name as 'name'
72
+ FROM information_schema.key_column_usage fk
73
+ WHERE fk.referenced_column_name is not null
74
+ AND fk.table_schema = 'dummy_development'
75
+ AND fk.table_name = 'mn_notifications'
76
+
77
+  (0.1ms) SHOW CREATE TABLE `mn_notifications`
78
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
79
+ ,fk.referenced_column_name as 'primary_key'
80
+ ,fk.column_name as 'column'
81
+ ,fk.constraint_name as 'name'
82
+ FROM information_schema.key_column_usage fk
83
+ WHERE fk.referenced_column_name is not null
84
+ AND fk.table_schema = 'dummy_development'
85
+ AND fk.table_name = 'mn_user_notification_settings'
86
+
87
+  (0.1ms) SHOW CREATE TABLE `mn_user_notification_settings`
88
+  (0.2ms) SELECT fk.referenced_table_name as 'to_table'
89
+ ,fk.referenced_column_name as 'primary_key'
90
+ ,fk.column_name as 'column'
91
+ ,fk.constraint_name as 'name'
92
+ FROM information_schema.key_column_usage fk
93
+ WHERE fk.referenced_column_name is not null
94
+ AND fk.table_schema = 'dummy_development'
95
+ AND fk.table_name = 'mn_user_notifications'
96
+
97
+  (0.1ms) SHOW CREATE TABLE `mn_user_notifications`
98
+  (93.6ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
99
+  (199.2ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
100
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
101
+ Migrating to CreateMetaNotificationNotificationTypes (20160615074820)
102
+  (85.4ms) CREATE TABLE `mn_notification_types` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL, `display_name` varchar(255), `created_by_id` int(11) NOT NULL, `updated_by_id` int(11) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
103
+  (0.1ms) BEGIN
104
+ SQL (0.2ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160615074820')
105
+  (52.2ms) COMMIT
106
+ Migrating to CreateMetaNotificationNotificationTemplates (20160618094218)
107
+  (82.0ms) CREATE TABLE `mn_notification_templates` (`id` int(11) auto_increment PRIMARY KEY, `notification_type_id` int(11) NOT NULL, `in_app` varchar(255), `mobile` varchar(255), `push` varchar(255), `email` text, `sms` varchar(255), `email_subject` varchar(255), `resource_id` int(11), `resource_type` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
108
+  (157.2ms) CREATE UNIQUE INDEX `unique_type_resource_index` ON `mn_notification_templates` (`notification_type_id`, `resource_type`, `resource_id`) 
109
+  (167.0ms) CREATE INDEX `resource_index` ON `mn_notification_templates` (`resource_type`, `resource_id`)
110
+  (0.1ms) BEGIN
111
+ SQL (0.3ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160618094218')
112
+  (47.9ms) COMMIT
113
+ Migrating to CreateMetaNotificationNotifications (20160619133533)
114
+  (81.1ms) CREATE TABLE `mn_notifications` (`id` int(11) auto_increment PRIMARY KEY, `notification_template_id` int(11) NOT NULL, `in_app` text NOT NULL, `mobile` text NOT NULL, `resource_type` varchar(255), `resource_id` int(11), `created_by_id` int(11) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_mn_notifications_on_notification_template_id` (`notification_template_id`) , INDEX `index_mn_notifications_on_created_by_id` (`created_by_id`) ) ENGINE=InnoDB
115
+  (0.1ms) BEGIN
116
+ SQL (0.2ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160619133533')
117
+  (48.2ms) COMMIT
118
+ Migrating to CreateMetaNotificationUserNotifications (20160620015754)
119
+  (80.5ms) CREATE TABLE `mn_user_notifications` (`id` int(11) auto_increment PRIMARY KEY, `user_id` int(11) NOT NULL, `notification_id` int(11) NOT NULL, `notification_type_id` int(11) NOT NULL, `is_read` tinyint(1) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_mn_user_notifications_on_user_id` (`user_id`) , INDEX `index_mn_user_notifications_on_notification_id` (`notification_id`) , INDEX `index_mn_user_notifications_on_notification_type_id` (`notification_type_id`) ) ENGINE=InnoDB
120
+  (0.2ms) BEGIN
121
+ SQL (0.3ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160620015754')
122
+  (47.9ms) COMMIT
123
+ Migrating to CreateMetaNotificationNotificationSettings (20160620020944)
124
+  (82.1ms) CREATE TABLE `mn_notification_settings` (`id` int(11) auto_increment PRIMARY KEY, `notification_type_id` int(11) NOT NULL, `is_mute` tinyint(1) DEFAULT 0 NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
125
+  (0.1ms) BEGIN
126
+ SQL (0.3ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160620020944')
127
+  (48.2ms) COMMIT
128
+ Migrating to CreateMetaNotificationUserNotificationSettings (20160620052742)
129
+  (81.7ms) CREATE TABLE `mn_user_notification_settings` (`id` int(11) auto_increment PRIMARY KEY, `user_id` int(11) NOT NULL, `notification_type_id` int(11) NOT NULL, `is_mute` tinyint(1) DEFAULT 0 NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, INDEX `index_mn_user_notification_settings_on_notification_type_id` (`notification_type_id`) ) ENGINE=InnoDB
130
+  (140.9ms) CREATE UNIQUE INDEX `unique_user_notification_type_index` ON `mn_user_notification_settings` (`user_id`, `notification_type_id`) 
131
+  (0.1ms) BEGIN
132
+ SQL (0.2ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160620052742')
133
+  (48.4ms) COMMIT
134
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
135
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
136
+ ,fk.referenced_column_name as 'primary_key'
137
+ ,fk.column_name as 'column'
138
+ ,fk.constraint_name as 'name'
139
+ FROM information_schema.key_column_usage fk
140
+ WHERE fk.referenced_column_name is not null
141
+ AND fk.table_schema = 'dummy_development'
142
+ AND fk.table_name = 'mn_notification_settings'
143
+
144
+  (0.2ms) SHOW CREATE TABLE `mn_notification_settings`
145
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
146
+ ,fk.referenced_column_name as 'primary_key'
147
+ ,fk.column_name as 'column'
148
+ ,fk.constraint_name as 'name'
149
+ FROM information_schema.key_column_usage fk
150
+ WHERE fk.referenced_column_name is not null
151
+ AND fk.table_schema = 'dummy_development'
152
+ AND fk.table_name = 'mn_notification_templates'
153
+
154
+  (0.2ms) SHOW CREATE TABLE `mn_notification_templates`
155
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
156
+ ,fk.referenced_column_name as 'primary_key'
157
+ ,fk.column_name as 'column'
158
+ ,fk.constraint_name as 'name'
159
+ FROM information_schema.key_column_usage fk
160
+ WHERE fk.referenced_column_name is not null
161
+ AND fk.table_schema = 'dummy_development'
162
+ AND fk.table_name = 'mn_notification_types'
163
+
164
+  (0.2ms) SHOW CREATE TABLE `mn_notification_types`
165
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
166
+ ,fk.referenced_column_name as 'primary_key'
167
+ ,fk.column_name as 'column'
168
+ ,fk.constraint_name as 'name'
169
+ FROM information_schema.key_column_usage fk
170
+ WHERE fk.referenced_column_name is not null
171
+ AND fk.table_schema = 'dummy_development'
172
+ AND fk.table_name = 'mn_notifications'
173
+
174
+  (0.2ms) SHOW CREATE TABLE `mn_notifications`
175
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
176
+ ,fk.referenced_column_name as 'primary_key'
177
+ ,fk.column_name as 'column'
178
+ ,fk.constraint_name as 'name'
179
+ FROM information_schema.key_column_usage fk
180
+ WHERE fk.referenced_column_name is not null
181
+ AND fk.table_schema = 'dummy_development'
182
+ AND fk.table_name = 'mn_user_notification_settings'
183
+
184
+  (0.2ms) SHOW CREATE TABLE `mn_user_notification_settings`
185
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
186
+ ,fk.referenced_column_name as 'primary_key'
187
+ ,fk.column_name as 'column'
188
+ ,fk.constraint_name as 'name'
189
+ FROM information_schema.key_column_usage fk
190
+ WHERE fk.referenced_column_name is not null
191
+ AND fk.table_schema = 'dummy_development'
192
+ AND fk.table_name = 'mn_user_notifications'
193
+
194
+  (0.2ms) SHOW CREATE TABLE `mn_user_notifications`
195
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
196
+ Migrating to AddAttachmentAttachmentToNotifications (20160727124414)
197
+  (583.4ms) ALTER TABLE `mn_notifications` ADD `attachment_file_name` varchar(255)
198
+  (274.9ms) ALTER TABLE `mn_notifications` ADD `attachment_content_type` varchar(255)
199
+  (266.6ms) ALTER TABLE `mn_notifications` ADD `attachment_file_size` int(11)
200
+  (250.0ms) ALTER TABLE `mn_notifications` ADD `attachment_updated_at` datetime
201
+  (0.1ms) BEGIN
202
+ SQL (24.6ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160727124414')
203
+  (50.3ms) COMMIT
204
+ ActiveRecord::SchemaMigration Load (21.9ms) SELECT `schema_migrations`.* FROM `schema_migrations`
205
+  (1.6ms) SELECT fk.referenced_table_name as 'to_table'
206
+ ,fk.referenced_column_name as 'primary_key'
207
+ ,fk.column_name as 'column'
208
+ ,fk.constraint_name as 'name'
209
+ FROM information_schema.key_column_usage fk
210
+ WHERE fk.referenced_column_name is not null
211
+ AND fk.table_schema = 'dummy_development'
212
+ AND fk.table_name = 'mn_notification_settings'
213
+
214
+  (0.2ms) SHOW CREATE TABLE `mn_notification_settings`
215
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
216
+ ,fk.referenced_column_name as 'primary_key'
217
+ ,fk.column_name as 'column'
218
+ ,fk.constraint_name as 'name'
219
+ FROM information_schema.key_column_usage fk
220
+ WHERE fk.referenced_column_name is not null
221
+ AND fk.table_schema = 'dummy_development'
222
+ AND fk.table_name = 'mn_notification_templates'
223
+
224
+  (0.1ms) SHOW CREATE TABLE `mn_notification_templates`
225
+  (0.2ms) SELECT fk.referenced_table_name as 'to_table'
226
+ ,fk.referenced_column_name as 'primary_key'
227
+ ,fk.column_name as 'column'
228
+ ,fk.constraint_name as 'name'
229
+ FROM information_schema.key_column_usage fk
230
+ WHERE fk.referenced_column_name is not null
231
+ AND fk.table_schema = 'dummy_development'
232
+ AND fk.table_name = 'mn_notification_types'
233
+
234
+  (0.1ms) SHOW CREATE TABLE `mn_notification_types`
235
+  (0.6ms) SELECT fk.referenced_table_name as 'to_table'
236
+ ,fk.referenced_column_name as 'primary_key'
237
+ ,fk.column_name as 'column'
238
+ ,fk.constraint_name as 'name'
239
+ FROM information_schema.key_column_usage fk
240
+ WHERE fk.referenced_column_name is not null
241
+ AND fk.table_schema = 'dummy_development'
242
+ AND fk.table_name = 'mn_notifications'
243
+
244
+  (0.1ms) SHOW CREATE TABLE `mn_notifications`
245
+  (0.2ms) SELECT fk.referenced_table_name as 'to_table'
246
+ ,fk.referenced_column_name as 'primary_key'
247
+ ,fk.column_name as 'column'
248
+ ,fk.constraint_name as 'name'
249
+ FROM information_schema.key_column_usage fk
250
+ WHERE fk.referenced_column_name is not null
251
+ AND fk.table_schema = 'dummy_development'
252
+ AND fk.table_name = 'mn_user_notification_settings'
253
+
254
+  (0.1ms) SHOW CREATE TABLE `mn_user_notification_settings`
255
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
256
+ ,fk.referenced_column_name as 'primary_key'
257
+ ,fk.column_name as 'column'
258
+ ,fk.constraint_name as 'name'
259
+ FROM information_schema.key_column_usage fk
260
+ WHERE fk.referenced_column_name is not null
261
+ AND fk.table_schema = 'dummy_development'
262
+ AND fk.table_name = 'mn_user_notifications'
263
+
264
+  (0.1ms) SHOW CREATE TABLE `mn_user_notifications`