meta_notification 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +35 -0
- data/app/assets/javascripts/meta_notification/application.js +13 -0
- data/app/assets/stylesheets/meta_notification/application.css +15 -0
- data/app/controllers/meta_notification/api/v1/notification_settings_controller.rb +24 -0
- data/app/controllers/meta_notification/api/v1/notification_templates_controller.rb +61 -0
- data/app/controllers/meta_notification/api/v1/notification_types_controller.rb +64 -0
- data/app/controllers/meta_notification/api/v1/notifications_controller.rb +22 -0
- data/app/controllers/meta_notification/api/v1/user_notification_settings_controller.rb +20 -0
- data/app/controllers/meta_notification/api/v1/user_notifications_controller.rb +75 -0
- data/app/controllers/meta_notification/application_controller.rb +4 -0
- data/app/helpers/meta_notification/application_helper.rb +4 -0
- data/app/models/meta_notification/notification.rb +12 -0
- data/app/models/meta_notification/notification_setting.rb +9 -0
- data/app/models/meta_notification/notification_template.rb +17 -0
- data/app/models/meta_notification/notification_type.rb +22 -0
- data/app/models/meta_notification/user_notification.rb +6 -0
- data/app/models/meta_notification/user_notification_setting.rb +10 -0
- data/app/views/layouts/meta_notification/application.html.erb +14 -0
- data/app/views/meta_notification/api/v1/notification_settings/create.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_settings/destroy.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_settings/index.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_settings/show.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_settings/update.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_templates/create.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_templates/destroy.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_templates/index.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_templates/show.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_templates/update.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_types/create.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_types/destroy.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_types/index.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_types/show.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notification_types/update.html.erb +2 -0
- data/app/views/meta_notification/api/v1/notifications/resource_notification.rabl +14 -0
- data/app/views/meta_notification/api/v1/user_notification_settings/create.html.erb +2 -0
- data/app/views/meta_notification/api/v1/user_notification_settings/destroy.html.erb +2 -0
- data/app/views/meta_notification/api/v1/user_notification_settings/index.html.erb +2 -0
- data/app/views/meta_notification/api/v1/user_notification_settings/show.html.erb +2 -0
- data/app/views/meta_notification/api/v1/user_notification_settings/update.html.erb +2 -0
- data/app/views/meta_notification/api/v1/user_notifications/message_notifications.rabl +0 -0
- data/app/views/meta_notification/api/v1/user_notifications/notifications.rabl +21 -0
- data/config/routes.rb +45 -0
- data/db/migrate/20160615074820_create_meta_notification_notification_types.rb +15 -0
- data/db/migrate/20160618094218_create_meta_notification_notification_templates.rb +19 -0
- data/db/migrate/20160619133533_create_meta_notification_notifications.rb +14 -0
- data/db/migrate/20160620015754_create_meta_notification_user_notifications.rb +12 -0
- data/db/migrate/20160620020944_create_meta_notification_notification_settings.rb +10 -0
- data/db/migrate/20160620052742_create_meta_notification_user_notification_settings.rb +12 -0
- data/db/migrate/20160727124414_add_attachment_attachment_to_mn_notifications.rb +11 -0
- data/lib/api_constraints.rb +10 -0
- data/lib/meta_notification/engine.rb +15 -0
- data/lib/meta_notification/version.rb +3 -0
- data/lib/meta_notification.rb +7 -0
- data/lib/meta_notification_authority.rb +39 -0
- data/lib/mn_authorizers/notification_setting_authorizer.rb +28 -0
- data/lib/mn_authorizers/notification_template_authorizer.rb +28 -0
- data/lib/mn_authorizers/notification_type_authorizer.rb +28 -0
- data/lib/mn_authorizers/test_authorizer.rb +11 -0
- data/lib/mn_authorizers/user_notification_authorizer.rb +28 -0
- data/lib/tasks/meta_notification_tasks.rake +4 -0
- data/spec/controllers/meta_notification/api/v1/notification_settings_controller_spec.rb +42 -0
- data/spec/controllers/meta_notification/api/v1/notification_templates_controller_spec.rb +42 -0
- data/spec/controllers/meta_notification/api/v1/notification_types_controller_spec.rb +42 -0
- data/spec/controllers/meta_notification/api/v1/notifications_controller_spec.rb +7 -0
- data/spec/controllers/meta_notification/api/v1/user_notification_settings_controller_spec.rb +42 -0
- data/spec/controllers/meta_notification/api/v1/user_notifications_controller_spec.rb +42 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config/application.rb +33 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +54 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/schema.rb +91 -0
- data/spec/dummy/log/development.log +264 -0
- data/spec/dummy/log/test.log +1192 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/factories/meta_notification/notification_settings.rb +28 -0
- data/spec/factories/meta_notification/notification_templates.rb +59 -0
- data/spec/factories/meta_notification/notification_types.rb +35 -0
- data/spec/factories/meta_notification/notifications.rb +80 -0
- data/spec/factories/meta_notification/user_notification_settings.rb +34 -0
- data/spec/factories/meta_notification/user_notifications.rb +35 -0
- data/spec/models/meta_notification/notification_setting_spec.rb +31 -0
- data/spec/models/meta_notification/notification_spec.rb +39 -0
- data/spec/models/meta_notification/notification_template_spec.rb +37 -0
- data/spec/models/meta_notification/notification_type_spec.rb +36 -0
- data/spec/models/meta_notification/user_notification_setting_spec.rb +31 -0
- data/spec/models/meta_notification/user_notification_spec.rb +28 -0
- data/spec/rails_helper.rb +60 -0
- data/spec/spec_helper.rb +92 -0
- data/spec/views/meta_notification/api/v1/notification_settings/create.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_settings/destroy.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_settings/index.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_settings/show.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_settings/update.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_templates/create.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_templates/destroy.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_templates/index.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_templates/show.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_templates/update.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_types/create.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_types/destroy.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_types/index.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_types/show.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/notification_types/update.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/user_notification_settings/create.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/user_notification_settings/destroy.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/user_notification_settings/index.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/user_notification_settings/show.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/user_notification_settings/update.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/user_notifications/create.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/user_notifications/destroy.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/user_notifications/index.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/user_notifications/show.html.erb_spec.rb +5 -0
- data/spec/views/meta_notification/api/v1/user_notifications/update.html.erb_spec.rb +5 -0
- metadata +355 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
[1m[36m (163.6ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
|
2
|
+
[1m[35m (290.6ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
|
4
|
+
Migrating to CreateMetaNotificationNotificationTypes (20160620071720)
|
|
5
|
+
[1m[35m (84.8ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
7
|
+
[1m[35mSQL (1.4ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20160620071720')
|
|
8
|
+
[1m[36m (89.7ms)[0m [1mCOMMIT[0m
|
|
9
|
+
Migrating to CreateMetaNotificationNotificationTemplates (20160620071721)
|
|
10
|
+
[1m[35m (82.3ms)[0m 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
|
+
[1m[36m (174.0ms)[0m [1mCREATE UNIQUE INDEX `unique_type_resource_index` ON `mn_notification_templates` (`notification_type_id`, `resource_type`, `resource_id`) [0m
|
|
12
|
+
[1m[35m (159.0ms)[0m CREATE INDEX `resource_index` ON `mn_notification_templates` (`resource_type`, `resource_id`)
|
|
13
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
14
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20160620071721')
|
|
15
|
+
[1m[36m (106.3ms)[0m [1mCOMMIT[0m
|
|
16
|
+
Migrating to CreateMetaNotificationNotifications (20160620071722)
|
|
17
|
+
[1m[35m (89.4ms)[0m 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
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
|
19
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20160620071722')
|
|
20
|
+
[1m[36m (46.5ms)[0m [1mCOMMIT[0m
|
|
21
|
+
Migrating to CreateMetaNotificationUserNotifications (20160620071723)
|
|
22
|
+
[1m[35m (81.0ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
24
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20160620071723')
|
|
25
|
+
[1m[36m (48.3ms)[0m [1mCOMMIT[0m
|
|
26
|
+
Migrating to CreateMetaNotificationNotificationSettings (20160620071724)
|
|
27
|
+
[1m[35m (89.4ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
29
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20160620071724')
|
|
30
|
+
[1m[36m (46.9ms)[0m [1mCOMMIT[0m
|
|
31
|
+
Migrating to CreateMetaNotificationUserNotificationSettings (20160620071725)
|
|
32
|
+
[1m[35m (81.6ms)[0m 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
|
+
[1m[36m (165.9ms)[0m [1mCREATE UNIQUE INDEX `unique_user_notification_type_index` ON `mn_user_notification_settings` (`user_id`, `notification_type_id`) [0m
|
|
34
|
+
[1m[35m (0.2ms)[0m BEGIN
|
|
35
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20160620071725')[0m
|
|
36
|
+
[1m[35m (55.8ms)[0m COMMIT
|
|
37
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
|
38
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `mn_notification_settings`[0m
|
|
48
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mSHOW CREATE TABLE `mn_notification_templates`[0m
|
|
58
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `mn_notification_types`[0m
|
|
68
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `mn_notifications`[0m
|
|
78
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `mn_user_notification_settings`[0m
|
|
88
|
+
[1m[35m (0.2ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `mn_user_notifications`[0m
|
|
98
|
+
[1m[36m (93.6ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
|
99
|
+
[1m[35m (199.2ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
|
100
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
|
101
|
+
Migrating to CreateMetaNotificationNotificationTypes (20160615074820)
|
|
102
|
+
[1m[35m (85.4ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
104
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20160615074820')
|
|
105
|
+
[1m[36m (52.2ms)[0m [1mCOMMIT[0m
|
|
106
|
+
Migrating to CreateMetaNotificationNotificationTemplates (20160618094218)
|
|
107
|
+
[1m[35m (82.0ms)[0m 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
|
+
[1m[36m (157.2ms)[0m [1mCREATE UNIQUE INDEX `unique_type_resource_index` ON `mn_notification_templates` (`notification_type_id`, `resource_type`, `resource_id`) [0m
|
|
109
|
+
[1m[35m (167.0ms)[0m CREATE INDEX `resource_index` ON `mn_notification_templates` (`resource_type`, `resource_id`)
|
|
110
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
111
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20160618094218')
|
|
112
|
+
[1m[36m (47.9ms)[0m [1mCOMMIT[0m
|
|
113
|
+
Migrating to CreateMetaNotificationNotifications (20160619133533)
|
|
114
|
+
[1m[35m (81.1ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
116
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20160619133533')
|
|
117
|
+
[1m[36m (48.2ms)[0m [1mCOMMIT[0m
|
|
118
|
+
Migrating to CreateMetaNotificationUserNotifications (20160620015754)
|
|
119
|
+
[1m[35m (80.5ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
|
121
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20160620015754')
|
|
122
|
+
[1m[36m (47.9ms)[0m [1mCOMMIT[0m
|
|
123
|
+
Migrating to CreateMetaNotificationNotificationSettings (20160620020944)
|
|
124
|
+
[1m[35m (82.1ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
126
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20160620020944')
|
|
127
|
+
[1m[36m (48.2ms)[0m [1mCOMMIT[0m
|
|
128
|
+
Migrating to CreateMetaNotificationUserNotificationSettings (20160620052742)
|
|
129
|
+
[1m[35m (81.7ms)[0m 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
|
+
[1m[36m (140.9ms)[0m [1mCREATE UNIQUE INDEX `unique_user_notification_type_index` ON `mn_user_notification_settings` (`user_id`, `notification_type_id`) [0m
|
|
131
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
132
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20160620052742')[0m
|
|
133
|
+
[1m[35m (48.4ms)[0m COMMIT
|
|
134
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
|
135
|
+
[1m[35m (0.4ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mSHOW CREATE TABLE `mn_notification_settings`[0m
|
|
145
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mSHOW CREATE TABLE `mn_notification_templates`[0m
|
|
155
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mSHOW CREATE TABLE `mn_notification_types`[0m
|
|
165
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mSHOW CREATE TABLE `mn_notifications`[0m
|
|
175
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mSHOW CREATE TABLE `mn_user_notification_settings`[0m
|
|
185
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mSHOW CREATE TABLE `mn_user_notifications`[0m
|
|
195
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
|
196
|
+
Migrating to AddAttachmentAttachmentToNotifications (20160727124414)
|
|
197
|
+
[1m[35m (583.4ms)[0m ALTER TABLE `mn_notifications` ADD `attachment_file_name` varchar(255)
|
|
198
|
+
[1m[36m (274.9ms)[0m [1mALTER TABLE `mn_notifications` ADD `attachment_content_type` varchar(255)[0m
|
|
199
|
+
[1m[35m (266.6ms)[0m ALTER TABLE `mn_notifications` ADD `attachment_file_size` int(11)
|
|
200
|
+
[1m[36m (250.0ms)[0m [1mALTER TABLE `mn_notifications` ADD `attachment_updated_at` datetime[0m
|
|
201
|
+
[1m[35m (0.1ms)[0m BEGIN
|
|
202
|
+
[1m[36mSQL (24.6ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20160727124414')[0m
|
|
203
|
+
[1m[35m (50.3ms)[0m COMMIT
|
|
204
|
+
[1m[36mActiveRecord::SchemaMigration Load (21.9ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
|
205
|
+
[1m[35m (1.6ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mSHOW CREATE TABLE `mn_notification_settings`[0m
|
|
215
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `mn_notification_templates`[0m
|
|
225
|
+
[1m[35m (0.2ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `mn_notification_types`[0m
|
|
235
|
+
[1m[35m (0.6ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `mn_notifications`[0m
|
|
245
|
+
[1m[35m (0.2ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `mn_user_notification_settings`[0m
|
|
255
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `mn_user_notifications`[0m
|