Initial commit of foodsoft 2
This commit is contained in:
commit
5b9a7e05df
657 changed files with 70444 additions and 0 deletions
25
db/migrate/013_add_messaging.rb
Normal file
25
db/migrate/013_add_messaging.rb
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
class AddMessaging < ActiveRecord::Migration
|
||||
def self.up
|
||||
# Table that holds the messages:
|
||||
create_table :messages do |t|
|
||||
t.column :sender_id, :integer
|
||||
t.column :recipient_id, :integer, :null => false
|
||||
t.column :recipients, :string, :null => false
|
||||
t.column :subject, :string, :null => false
|
||||
t.column :body, :text, :null => false
|
||||
t.column :read, :boolean, :null => false, :default => false
|
||||
t.column :email_state, :integer, :null => false
|
||||
t.column :created_on, :timestamp, :null => false
|
||||
end
|
||||
add_index(:messages, :sender_id)
|
||||
add_index(:messages, :recipient_id)
|
||||
|
||||
# Setup acts_as_configurable plugin for user options etc.
|
||||
ConfigurableSetting.create_table
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :messages
|
||||
ConfigurableSetting.drop_table
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue