Complete refactoring of messaging module. From now messages are saved only once and send afterwards via a the 'send_emails'-rake-task.
This commit is contained in:
parent
6ce6c2c75a
commit
e8d55e50c0
30 changed files with 220 additions and 349 deletions
20
db/migrate/20090115123421_refactor_messaging.rb
Normal file
20
db/migrate/20090115123421_refactor_messaging.rb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
class RefactorMessaging < ActiveRecord::Migration
|
||||
def self.up
|
||||
|
||||
drop_table :messages
|
||||
|
||||
create_table :messages do |t|
|
||||
t.references :sender
|
||||
t.text :recipients_ids
|
||||
t.string :subject, :null => false
|
||||
t.text :body
|
||||
t.integer :email_state, :default => 0, :null => false
|
||||
t.boolean :private, :default => false
|
||||
t.datetime :created_at
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def self.down
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue