maily_herald-webui 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +8 -8
  2. data/Gemfile +1 -3
  3. data/Gemfile.lock +179 -162
  4. data/README.md +33 -7
  5. data/Rakefile +1 -1
  6. data/app/assets/javascripts/maily_herald/webui/dispatches.coffee +1 -0
  7. data/app/assets/javascripts/maily_herald/webui/webui.coffee +22 -14
  8. data/app/assets/stylesheets/maily_herald/webui/webui.sass +23 -2
  9. data/app/controllers/maily_herald/webui/ad_hoc_mailings_controller.rb +33 -0
  10. data/app/controllers/maily_herald/webui/application_controller.rb +9 -5
  11. data/app/controllers/maily_herald/webui/dashboard_controller.rb +2 -2
  12. data/app/controllers/maily_herald/webui/dispatches_controller.rb +2 -2
  13. data/app/controllers/maily_herald/webui/lists_controller.rb +2 -2
  14. data/app/controllers/maily_herald/webui/mailings_controller.rb +20 -8
  15. data/app/controllers/maily_herald/webui/one_time_mailings_controller.rb +14 -11
  16. data/app/controllers/maily_herald/webui/periodical_mailings_controller.rb +1 -1
  17. data/app/controllers/maily_herald/webui/resources_controller.rb +10 -6
  18. data/app/controllers/maily_herald/webui/sequence_mailings_controller.rb +1 -1
  19. data/app/controllers/maily_herald/webui/sequences_controller.rb +6 -6
  20. data/app/controllers/maily_herald/webui/sessions_controller.rb +8 -4
  21. data/app/controllers/maily_herald/webui/subscriptions_controller.rb +4 -1
  22. data/app/helpers/maily_herald/webui/application_helper.rb +22 -2
  23. data/app/helpers/maily_herald/webui/dashboard_helper.rb +14 -0
  24. data/app/helpers/maily_herald/webui/lists_helper.rb +13 -0
  25. data/app/helpers/maily_herald/webui/logs_helper.rb +6 -1
  26. data/app/helpers/maily_herald/webui/mailings_helper.rb +50 -5
  27. data/app/helpers/maily_herald/webui/sequences_helper.rb +13 -0
  28. data/app/helpers/maily_herald/webui/subscribers_helper.rb +1 -1
  29. data/app/mailers/ad_hoc_mailer.rb +8 -0
  30. data/app/mailers/custom_one_time_mailer.rb +7 -0
  31. data/app/models/maily_herald/webui/settings.rb +70 -0
  32. data/app/views/layouts/maily_herald/webui/application.html.haml +6 -7
  33. data/app/views/maily_herald/webui/dashboard/index.html.haml +31 -17
  34. data/app/views/maily_herald/webui/dashboard/index.js.erb +6 -2
  35. data/app/views/maily_herald/webui/dispatches/_logs.html.haml +4 -0
  36. data/app/views/maily_herald/webui/dispatches/_schedules.html.haml +4 -0
  37. data/app/views/maily_herald/webui/dispatches/_subscribers.html.haml +13 -0
  38. data/app/views/maily_herald/webui/lists/_header.html.haml +0 -3
  39. data/app/views/maily_herald/webui/lists/_items.html.haml +1 -1
  40. data/app/views/maily_herald/webui/lists/{context_variables.html.haml → context_attributes.html.haml} +5 -2
  41. data/app/views/maily_herald/webui/lists/subscribe.js.erb +2 -2
  42. data/app/views/maily_herald/webui/lists/unsubscribe.js.erb +1 -1
  43. data/app/views/maily_herald/webui/logs/_items.html.haml +2 -2
  44. data/app/views/maily_herald/webui/logs/preview.html.haml +26 -1
  45. data/app/views/maily_herald/webui/mailings/_deliver.js.erb +1 -1
  46. data/app/views/maily_herald/webui/mailings/_details.html.haml +9 -6
  47. data/app/views/maily_herald/webui/mailings/_details_form.html.haml +4 -2
  48. data/app/views/maily_herald/webui/mailings/_form_one_time.html.haml +1 -0
  49. data/app/views/maily_herald/webui/mailings/_header.html.haml +3 -3
  50. data/app/views/maily_herald/webui/mailings/_template.html.haml +4 -3
  51. data/app/views/maily_herald/webui/resources/new.html.haml +1 -1
  52. data/app/views/maily_herald/webui/sequences/_header.html.haml +11 -6
  53. data/app/views/maily_herald/webui/sequences/_list.html.haml +1 -1
  54. data/app/views/maily_herald/webui/subscribers/_item.html.haml +4 -0
  55. data/app/views/maily_herald/webui/subscribers/_list.html.haml +2 -0
  56. data/app/views/maily_herald/webui/subscriptions/show.html.haml +5 -1
  57. data/config/locales/en.yml +51 -9
  58. data/config/routes.rb +13 -3
  59. data/lib/maily_herald/webui/form_builder.rb +7 -2
  60. data/lib/maily_herald/webui/menu_manager.rb +1 -0
  61. data/lib/maily_herald/webui/version.rb +1 -1
  62. data/maily_herald-webui.gemspec +2 -2
  63. data/spec/dummy/app/models/user.rb +2 -1
  64. data/spec/dummy/bin/spring +4 -7
  65. data/spec/dummy/config/application.rb +5 -2
  66. data/spec/dummy/config/environments/development.rb +5 -3
  67. data/spec/dummy/config/environments/test.rb +3 -1
  68. data/spec/dummy/config/initializers/maily_herald.rb +33 -34
  69. data/spec/dummy/config/maily_herald.yml +4 -0
  70. data/spec/dummy/config/sidekiq.yml +5 -0
  71. data/spec/dummy/db/migrate/20130723074347_create_users.rb +1 -0
  72. data/spec/dummy/db/migrate/20150602133024_create_maily_herald_tables.maily_herald.rb +54 -0
  73. data/spec/dummy/db/schema.rb +31 -34
  74. metadata +24 -14
  75. data/app/views/maily_herald/webui/dispatches/_entities.html.haml +0 -7
  76. data/spec/dummy/db/migrate/20140804152249_create_maily_herald_tables.maily_herald.rb +0 -68
  77. data/spec/dummy/db/migrate/20140804152250_create_lists.maily_herald.rb +0 -33
@@ -9,7 +9,7 @@ MailyHerald::Webui::Engine.routes.draw do
9
9
  member do
10
10
  post "subscribe/:entity_id", action: :subscribe, as: :subscribe_to
11
11
  post "unsubscribe/:entity_id", action: :unsubscribe, as: :unsubscribe_from
12
- get "context_variables(/:context)", action: :context_variables, as: :context_variables
12
+ get "context_attributes(/:context)", action: :context_attributes, as: :context_attributes
13
13
  end
14
14
  end
15
15
  resources "subscriptions" do
@@ -17,7 +17,7 @@ MailyHerald::Webui::Engine.routes.draw do
17
17
  post "toggle"
18
18
  end
19
19
  end
20
- resources "one_time_mailings" do
20
+ resources "ad_hoc_mailings" do
21
21
  collection do
22
22
  get "archived"
23
23
  post "update_form"
@@ -28,6 +28,16 @@ MailyHerald::Webui::Engine.routes.draw do
28
28
  get "preview/:entity_id", action: :preview, as: :preview
29
29
  end
30
30
  end
31
+ resources "one_time_mailings" do
32
+ collection do
33
+ get "archived"
34
+ post "update_form"
35
+ end
36
+ member do
37
+ post "toggle"
38
+ get "preview/:entity_id", action: :preview, as: :preview
39
+ end
40
+ end
31
41
  resources "periodical_mailings" do
32
42
  collection do
33
43
  get "archived"
@@ -58,7 +68,7 @@ MailyHerald::Webui::Engine.routes.draw do
58
68
  end
59
69
  end
60
70
 
61
- post "switch_mode/:mode", to: "sessions#switch_mode", as: "switch_mode"
71
+ post "settings/:setting/switch", to: "sessions#switch_setting", as: "switch_setting"
62
72
 
63
73
 
64
74
 
@@ -13,7 +13,12 @@ module MailyHerald
13
13
  @control_col = options[:control_col] || default_control_col
14
14
  @inline_errors = options[:inline_errors] != false
15
15
  @help_scope = options[:help_scope]
16
- super
16
+
17
+ if Rails::VERSION::MAJOR >= 4.2
18
+ super
19
+ else
20
+ super object_name, object, template, options
21
+ end
17
22
  end
18
23
 
19
24
  def prepend_and_append_input(options, &block)
@@ -99,7 +104,7 @@ module MailyHerald
99
104
 
100
105
  def maily_from_field options = {}, html_options = {}
101
106
  form_group_builder(:from, options.merge(wrapper_class: "mailing-from")) do
102
- radio1 = content_tag(:label, content_tag(:span, @template.radio_button_tag(:mailing_from, "default", !object.from.present?), class: "radio-btn") + @template.display_mailing_from(object), class: "radio")
107
+ radio1 = content_tag(:label, content_tag(:span, @template.radio_button_tag(:mailing_from, "default", !object.from.present?), class: "radio-btn") + @template.tw("mailings.from.default", email: object.mailer.default[:from]), class: "radio")
103
108
  radio2 = content_tag(:label, content_tag(:span, @template.radio_button_tag(:mailing_from, "specify", object.from.present?), class: "radio-btn") + tw("mailings.from.specify"), class: "radio")
104
109
 
105
110
  field = prepend_and_append_input(options) do
@@ -51,6 +51,7 @@ module MailyHerald
51
51
  @items = [
52
52
  {:name => :dashboard, :title => :label_dashboard, :url => Proc.new{ root_path }},
53
53
  {:name => :lists, :title => :label_list_plural, :url => Proc.new{ lists_path }},
54
+ {:name => :ad_hoc_mailings, :title => :label_ad_hoc_mailing_plural, :url => Proc.new{ ad_hoc_mailings_path }},
54
55
  {:name => :one_time_mailings, :title => :label_one_time_mailing_plural, :url => Proc.new{ one_time_mailings_path }},
55
56
  {:name => :periodical_mailings, :title => :label_periodical_mailing_plural, :url => Proc.new{ periodical_mailings_path }},
56
57
  {:name => :sequences, :title => :label_sequence_plural, :url => Proc.new{ sequences_path }},
@@ -1,5 +1,5 @@
1
1
  module MailyHerald
2
2
  module Webui
3
- VERSION = "0.8.0"
3
+ VERSION = "0.9.0"
4
4
  end
5
5
  end
@@ -13,13 +13,13 @@ Gem::Specification.new do |s|
13
13
  s.email = ["lukasz@sology.eu"]
14
14
  s.homepage = "https://github.com/Sology/maily_herald-webui"
15
15
  s.license = "LGPL-3.0"
16
- s.description = s.summary = "Web UI for MailyHerald - Email marketing solution for Ruby on Rails applications"
16
+ s.description = s.summary = "Web UI for MailyHerald - Email processing solution for Ruby on Rails applications"
17
17
 
18
18
  s.files = `git ls-files`.split("\n")
19
19
  s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
20
  s.test_files = `git ls-files -- {spec,features}/**/`.split("\n")
21
21
 
22
- s.add_dependency 'maily_herald'
22
+ s.add_dependency 'maily_herald', "~>0.9.2"
23
23
  s.add_dependency "smart_listing", "~>1.1.0"
24
24
  s.add_dependency "haml"
25
25
  s.add_dependency "coffee-rails"
@@ -1,5 +1,6 @@
1
1
  class User < ActiveRecord::Base
2
- # attr_accessible :title, :body
2
+ scope :active, lambda { where(active: true) }
3
+ scope :inactive, lambda { where(active: false) }
3
4
 
4
5
  def to_s
5
6
  self.name
@@ -1,17 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- # This file loads spring without using Bundler, in order to be fast
4
- # It gets overwritten when you run the `spring binstub` command
3
+ # This file loads spring without using Bundler, in order to be fast.
4
+ # It gets overwritten when you run the `spring binstub` command.
5
5
 
6
6
  unless defined?(Spring)
7
7
  require "rubygems"
8
8
  require "bundler"
9
9
 
10
- if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
11
- ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
12
- ENV["GEM_HOME"] = ""
13
- Gem.paths = ENV
14
-
10
+ if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
11
+ Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
15
12
  gem "spring", match[1]
16
13
  require "spring/binstub"
17
14
  end
@@ -4,7 +4,7 @@ require File.expand_path('../boot', __FILE__)
4
4
  require "active_record/railtie"
5
5
  require "action_controller/railtie"
6
6
  require "action_mailer/railtie"
7
- require "active_resource/railtie"
7
+ #require "active_resource/railtie"
8
8
  require "sprockets/railtie"
9
9
  # require "rails/test_unit/railtie"
10
10
 
@@ -53,13 +53,16 @@ module Dummy
53
53
  # This will create an empty whitelist of attributes available for mass-assignment for all models
54
54
  # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
55
55
  # parameters by using an attr_accessible or attr_protected declaration.
56
- config.active_record.whitelist_attributes = true
56
+ # config.active_record.whitelist_attributes = true
57
57
 
58
58
  # Enable the asset pipeline
59
59
  config.assets.enabled = true
60
60
 
61
61
  # Version of your assets, change this if you want to expire all your assets
62
62
  config.assets.version = '1.0'
63
+
64
+ config.action_mailer.default_options = { from: "hello@mailyherald.org" }
65
+ config.action_mailer.default_url_options = { host: "mailyherald.org" }
63
66
  end
64
67
  end
65
68
 
@@ -23,16 +23,18 @@ Dummy::Application.configure do
23
23
  config.action_dispatch.best_standards_support = :builtin
24
24
 
25
25
  # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
26
+ #config.active_record.mass_assignment_sanitizer = :strict
27
27
 
28
28
  # Log the query plan for queries taking more than this (works
29
29
  # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
30
+ #config.active_record.auto_explain_threshold_in_seconds = 0.5
31
31
 
32
32
  # Do not compress assets
33
33
  config.assets.compress = false
34
34
 
35
35
  # Expands the lines which load the assets
36
36
  config.assets.debug = true
37
- config.serve_static_assets = true
37
+ config.serve_static_files = true
38
+
39
+ config.eager_load = false
38
40
  end
@@ -30,8 +30,10 @@ Dummy::Application.configure do
30
30
  config.action_mailer.delivery_method = :test
31
31
 
32
32
  # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
33
+ #config.active_record.mass_assignment_sanitizer = :strict
34
34
 
35
35
  # Print deprecation notices to the stderr
36
36
  config.active_support.deprecation = :stderr
37
+
38
+ config.eager_load = false
37
39
  end
@@ -1,11 +1,8 @@
1
1
  MailyHerald.setup do |config|
2
- config.default_from = "no-reply@maily_herald.com"
3
2
  config.token_redirect {|subscription| "/" }
4
3
 
5
4
  config.context :all_users do |context|
6
- context.title = "All users"
7
- context.scope {User.scoped}
8
- context.destination_attribute = :email
5
+ context.scope {User.active}
9
6
  context.destination {|user| user.email}
10
7
  context.attributes do |user|
11
8
  attribute_group(:user) do
@@ -22,33 +19,47 @@ MailyHerald.setup do |config|
22
19
  end
23
20
 
24
21
  config.list :generic_list do |list|
25
- list.title = "Generic list"
26
22
  list.context_name = :all_users
27
- list.token_custom_action do |controller, subscription|
28
- user = subscription.entity
29
- user.name = "changed"
30
- user.save!
31
- controller.redirect_to "/custom"
32
- end
23
+ end
24
+
25
+ config.list :locked_list, locked: true do |list|
26
+ list.context_name = :all_users
27
+ end
28
+
29
+ config.one_time_mailing :locked_mailing, locked: true do |mailing|
30
+ mailing.enable
31
+ mailing.title = "Test mailing"
32
+ mailing.subject = "Test mailing"
33
+ mailing.list = :generic_list
34
+ mailing.start_at = "user.created_at"
35
+ mailing.template = "User name: {{user.name}}."
33
36
  end
34
37
 
35
38
  config.one_time_mailing :test_mailing do |mailing|
36
- mailing.enabled = true
39
+ mailing.enable
37
40
  mailing.title = "Test mailing"
38
41
  mailing.subject = "Test mailing"
39
42
  mailing.list = :generic_list
43
+ mailing.start_at = "user.created_at"
40
44
  mailing.template = "User name: {{user.name}}."
41
45
  end
42
46
 
43
- config.one_time_mailing :sample_mail do |mailing|
44
- mailing.enabled = true
45
- mailing.title = "Sample mailing"
47
+ config.one_time_mailing :one_time_mail, locked: true do |mailing|
48
+ mailing.enable
49
+ mailing.title = "One time mailing"
50
+ mailing.list = :generic_list
51
+ mailing.mailer_name = "CustomOneTimeMailer"
52
+ mailing.start_at = "user.created_at"
53
+ end
54
+
55
+ config.ad_hoc_mailing :ad_hoc_mail do |mailing|
56
+ mailing.enable
57
+ mailing.title = "Ad hoc mailing"
46
58
  mailing.list = :generic_list
47
- mailing.mailer_name = "TestMailer"
48
59
  end
49
60
 
50
61
  config.sequence :newsletters do |seq|
51
- seq.enabled = true
62
+ seq.enable
52
63
  seq.title = "Newsletters"
53
64
  seq.list = :generic_list
54
65
  seq.start_at = "user.created_at"
@@ -57,38 +68,26 @@ MailyHerald.setup do |config|
57
68
  mailing.subject = "Test mailing #1"
58
69
  mailing.template = "User name: {{user.name}}."
59
70
  mailing.absolute_delay = 1.hour
60
- mailing.enabled = true
71
+ mailing.enable
61
72
  end
62
73
  seq.mailing :second_mail do |mailing|
63
74
  mailing.title = "Test mailing #2"
64
75
  mailing.subject = "Test mailing #2"
65
76
  mailing.template = "User name: {{user.name}}."
66
77
  mailing.absolute_delay = 3.hours
67
- mailing.enabled = true
78
+ mailing.enable
68
79
  end
69
80
  seq.mailing :third_mail do |mailing|
70
81
  mailing.title = "Test mailing #3"
71
82
  mailing.subject = "Test mailing #3"
72
83
  mailing.template = "User name: {{user.name}}."
73
84
  mailing.absolute_delay = 6.hours
74
- mailing.enabled = true
85
+ mailing.enable
75
86
  end
76
87
  end
77
88
 
78
89
  config.periodical_mailing :weekly_summary do |mailing|
79
- mailing.enabled = true
80
- mailing.title = "Weekly summary"
81
- mailing.subject = "Weekly summary"
82
- mailing.start_at = "user.created_at"
83
- mailing.list = :generic_list
84
- mailing.title = "Test periodical mailing"
85
- mailing.template = "User name: {{user.name}}."
86
- mailing.period = 7.days
87
- mailing.conditions = "user.weekly_notifications"
88
- end
89
-
90
- config.periodical_mailing :weekly_summary_sg do |mailing|
91
- mailing.enabled = true
90
+ mailing.enable
92
91
  mailing.title = "Weekly summary"
93
92
  mailing.subject = "Weekly summary"
94
93
  mailing.start_at = "user.created_at"
@@ -96,6 +95,6 @@ MailyHerald.setup do |config|
96
95
  mailing.title = "Test periodical mailing"
97
96
  mailing.template = "User name: {{user.name}}."
98
97
  mailing.period = 7.days
99
- mailing.conditions = "user.weekly_notifications"
98
+ mailing.conditions = "user.weekly_notifications == true"
100
99
  end
101
100
  end
@@ -0,0 +1,4 @@
1
+ ---
2
+ :verbose: false
3
+ :logfile: log/maily_herald.log
4
+ :pidfile: tmp/pids/maily_herald.pid
@@ -0,0 +1,5 @@
1
+ ---
2
+ :verbose: false
3
+ :pidfile: ./tmp/pids/sidekiq.pid
4
+ :logfile: ./log/sidekiq.log
5
+ :concurrency: 25
@@ -3,6 +3,7 @@ class CreateUsers < ActiveRecord::Migration
3
3
  create_table :users do |t|
4
4
  t.string :name
5
5
  t.string :email
6
+ t.boolean :active, :default => true
6
7
  t.boolean :weekly_notifications, :default => true
7
8
 
8
9
  t.timestamps
@@ -0,0 +1,54 @@
1
+ # This migration comes from maily_herald (originally 20150205120443)
2
+ class CreateMailyHeraldTables < ActiveRecord::Migration
3
+ def change
4
+ create_table :maily_herald_dispatches do |t|
5
+ t.string :type, null: false
6
+ t.integer :sequence_id
7
+ t.integer :list_id, null: false
8
+ t.text :conditions
9
+ t.text :start_at
10
+ t.string :mailer_name
11
+ t.string :name, null: false
12
+ t.string :title
13
+ t.string :subject
14
+ t.string :from
15
+ t.string :state, default: "disabled"
16
+ t.text :template
17
+ t.integer :absolute_delay
18
+ t.integer :period
19
+ t.boolean :override_subscription
20
+
21
+ t.timestamps
22
+ end
23
+ add_index :maily_herald_dispatches, :name, unique: true
24
+
25
+ create_table :maily_herald_subscriptions do |t|
26
+ t.integer :entity_id, null: false
27
+ t.integer :list_id, null: false
28
+ t.string :entity_type, null: false
29
+ t.string :token, null: false
30
+ t.text :settings
31
+ t.text :data
32
+ t.boolean :active, default: false, null: false
33
+ t.datetime :delivered_at
34
+
35
+ t.timestamps
36
+ end
37
+
38
+ create_table :maily_herald_logs do |t|
39
+ t.integer :entity_id, null: false
40
+ t.string :entity_type, null: false
41
+ t.string :entity_email
42
+ t.integer :mailing_id
43
+ t.string :status, null: false
44
+ t.text :data
45
+ t.datetime :processing_at
46
+ end
47
+
48
+ create_table :maily_herald_lists do |t|
49
+ t.string :name, null: false
50
+ t.string :title
51
+ t.string :context_name
52
+ end
53
+ end
54
+ end
@@ -9,71 +9,68 @@
9
9
  # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
10
  # you'll amass, the slower it'll run and the greater likelihood for issues).
11
11
  #
12
- # It's strongly recommended to check this file into your version control system.
12
+ # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20140804152250) do
14
+ ActiveRecord::Schema.define(version: 20150602133024) do
15
15
 
16
- create_table "maily_herald_dispatches", :force => true do |t|
17
- t.string "type", :null => false
16
+ create_table "maily_herald_dispatches", force: :cascade do |t|
17
+ t.string "type", null: false
18
18
  t.integer "sequence_id"
19
- t.string "context_name"
19
+ t.integer "list_id", null: false
20
20
  t.text "conditions"
21
+ t.text "start_at"
21
22
  t.string "mailer_name"
22
- t.string "name", :null => false
23
+ t.string "name", null: false
23
24
  t.string "title"
24
25
  t.string "subject"
25
26
  t.string "from"
27
+ t.string "state", default: "disabled"
26
28
  t.text "template"
27
29
  t.integer "absolute_delay"
28
30
  t.integer "period"
29
- t.boolean "enabled", :default => false
30
31
  t.boolean "override_subscription"
31
- t.datetime "created_at", :null => false
32
- t.datetime "updated_at", :null => false
33
- t.text "start_at"
34
- t.integer "list_id"
32
+ t.datetime "created_at"
33
+ t.datetime "updated_at"
35
34
  end
36
35
 
37
- add_index "maily_herald_dispatches", ["context_name"], :name => "index_maily_herald_dispatches_on_context_name"
38
- add_index "maily_herald_dispatches", ["name"], :name => "index_maily_herald_dispatches_on_name", :unique => true
36
+ add_index "maily_herald_dispatches", ["name"], name: "index_maily_herald_dispatches_on_name", unique: true
39
37
 
40
- create_table "maily_herald_lists", :force => true do |t|
41
- t.string "name", :null => false
38
+ create_table "maily_herald_lists", force: :cascade do |t|
39
+ t.string "name", null: false
42
40
  t.string "title"
43
41
  t.string "context_name"
44
- t.string "token_action"
45
42
  end
46
43
 
47
- create_table "maily_herald_logs", :force => true do |t|
48
- t.integer "entity_id", :null => false
49
- t.string "entity_type", :null => false
44
+ create_table "maily_herald_logs", force: :cascade do |t|
45
+ t.integer "entity_id", null: false
46
+ t.string "entity_type", null: false
47
+ t.string "entity_email"
50
48
  t.integer "mailing_id"
51
- t.string "status", :null => false
49
+ t.string "status", null: false
52
50
  t.text "data"
53
51
  t.datetime "processing_at"
54
- t.integer "sequence_id"
55
52
  end
56
53
 
57
- create_table "maily_herald_subscriptions", :force => true do |t|
58
- t.integer "entity_id", :null => false
59
- t.string "entity_type", :null => false
60
- t.string "token", :null => false
54
+ create_table "maily_herald_subscriptions", force: :cascade do |t|
55
+ t.integer "entity_id", null: false
56
+ t.integer "list_id", null: false
57
+ t.string "entity_type", null: false
58
+ t.string "token", null: false
61
59
  t.text "settings"
62
60
  t.text "data"
63
- t.boolean "active", :default => false, :null => false
61
+ t.boolean "active", default: false, null: false
64
62
  t.datetime "delivered_at"
65
- t.datetime "created_at", :null => false
66
- t.datetime "updated_at", :null => false
67
- t.integer "list_id"
68
- t.datetime "next_delivery_at"
63
+ t.datetime "created_at"
64
+ t.datetime "updated_at"
69
65
  end
70
66
 
71
- create_table "users", :force => true do |t|
67
+ create_table "users", force: :cascade do |t|
72
68
  t.string "name"
73
69
  t.string "email"
74
- t.boolean "weekly_notifications", :default => true
75
- t.datetime "created_at", :null => false
76
- t.datetime "updated_at", :null => false
70
+ t.boolean "active", default: true
71
+ t.boolean "weekly_notifications", default: true
72
+ t.datetime "created_at"
73
+ t.datetime "updated_at"
77
74
  end
78
75
 
79
76
  end