smailer 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,97 @@
1
+ class <%= @migration_name %> < ActiveRecord::Migration
2
+ def self.up
3
+ create_table "mailing_lists", :force => true do |t|
4
+ t.string "name"
5
+ t.datetime "created_at"
6
+ t.datetime "updated_at"
7
+ end
8
+
9
+ create_table "mail_campaigns", :force => true do |t|
10
+ t.integer "mailing_list_id"
11
+ t.string "from"
12
+ t.string "subject"
13
+ t.text "body_html"
14
+ t.integer "unsubscribe_methods"
15
+ t.datetime "created_at"
16
+ t.datetime "updated_at"
17
+ t.text "body_text"
18
+ t.integer "sent_mails_count", :default => 0, :null => false
19
+ t.integer "opened_mails_count", :default => 0, :null => false
20
+ end
21
+ add_index "mail_campaigns", ["mailing_list_id"], :name => "index_mail_campaigns_on_mailing_list_id"
22
+
23
+ create_table "queued_mails", :force => true do |t|
24
+ t.integer "mail_campaign_id"
25
+ t.string "to"
26
+ t.integer "retries", :default => 0, :null => false
27
+ t.datetime "last_retry_at"
28
+ t.string "last_error"
29
+ t.datetime "created_at"
30
+ t.datetime "updated_at"
31
+ t.string "key"
32
+ end
33
+ add_index "queued_mails", ["mail_campaign_id", "to"], :name => "index_queued_mails_on_mail_campain_id_and_to", :unique => true
34
+ add_index "queued_mails", ["retries"], :name => "index_queued_mails_on_retries"
35
+
36
+ create_table "finished_mails", :force => true do |t|
37
+ t.integer "mail_campaign_id"
38
+ t.string "from"
39
+ t.string "to"
40
+ t.string "subject"
41
+ t.text "body_html"
42
+ t.integer "retries"
43
+ t.datetime "last_retry_at"
44
+ t.string "last_error"
45
+ t.datetime "sent_at"
46
+ t.integer "status"
47
+ t.datetime "created_at"
48
+ t.datetime "updated_at"
49
+ t.text "body_text"
50
+ t.boolean "opened", :default => false, :null => false
51
+ t.string "key"
52
+ end
53
+ add_index "finished_mails", ["key"], :name => "index_finished_mails_on_key", :unique => true
54
+ add_index "finished_mails", ["mail_campaign_id", "status"], :name => "index_finished_mails_on_mail_campain_id_and_status"
55
+ add_index "finished_mails", ["to", "mail_campaign_id"], :name => "index_finished_mails_on_to_and_mail_campaign_id"
56
+
57
+ create_table "mail_keys", :force => true do |t|
58
+ t.string "email"
59
+ t.string "key"
60
+ t.datetime "created_at"
61
+ t.datetime "updated_at"
62
+ end
63
+ add_index "mail_keys", ["email"], :name => "index_mail_keys_on_email", :unique => true
64
+ add_index "mail_keys", ["key"], :name => "index_mail_keys_on_key", :unique => true
65
+
66
+ create_table "smailer_properties", :force => true do |t|
67
+ t.string "name"
68
+ t.text "value"
69
+ t.datetime "created_at"
70
+ t.datetime "updated_at"
71
+ t.string "notes"
72
+ end
73
+ add_index "smailer_properties", ["name"], :name => "index_smailer_properties_on_name", :unique => true
74
+ end
75
+
76
+ def self.down
77
+ drop_table :smailer_properties
78
+
79
+ remove_index :mail_keys, :name => "index_mail_keys_on_email"
80
+ remove_index :mail_keys, :name => "index_mail_keys_on_email"
81
+ drop_table :mail_keys
82
+
83
+ remove_index :finished_mails, :name => "index_finished_mails_on_key"
84
+ remove_index :finished_mails, :name => "index_finished_mails_on_mail_campain_id_and_status"
85
+ remove_index :finished_mails, :name => "index_finished_mails_on_to_and_mail_campaign_id"
86
+ drop_table :finished_mails
87
+
88
+ remove_index :queued_mails, :name => "index_queued_mails_on_mail_campain_id_and_to"
89
+ remove_index :queued_mails, :name => "index_queued_mails_on_retries"
90
+ drop_table :queued_mails
91
+
92
+ remove_index :mail_campaigns, :name => "index_mail_campaigns_on_mailing_list_id"
93
+ drop_table :mail_campaigns
94
+
95
+ drop_table :mailing_lists
96
+ end
97
+ end
@@ -1,3 +1,3 @@
1
1
  module Smailer
2
- VERSION = "0.2.8"
2
+ VERSION = "0.2.9"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smailer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 8
10
- version: 0.2.8
9
+ - 9
10
+ version: 0.2.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dimitar Dimitrov
@@ -50,6 +50,7 @@ files:
50
50
  - Rakefile
51
51
  - generators/smailer/USAGE
52
52
  - generators/smailer/smailer_migration_generator.rb
53
+ - generators/smailer/templates/migration.rb.erb
53
54
  - lib/generators/smailer/migration_generator.rb
54
55
  - lib/generators/smailer/templates/migration.rb.erb
55
56
  - lib/smailer.rb