start to switch to rails 3.2.2
This commit is contained in:
parent
244942a78f
commit
74c23fa0d1
253 changed files with 648 additions and 17155 deletions
|
@ -1,15 +0,0 @@
|
|||
class CreateUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :users do |t|
|
||||
t.string :email
|
||||
t.string :first_name
|
||||
t.string :last_name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :users
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
class CreateServers < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :servers do |t|
|
||||
t.string :name
|
||||
t.string :port
|
||||
t.references :user
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :servers
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
class CreatePrefs < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :prefs do |t|
|
||||
t.string :theme
|
||||
t.string :locale
|
||||
t.references :user
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :prefs
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
class AddParamsToPrefs < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :prefs, :msgs_per_page, :string
|
||||
add_column :prefs, :msg_send_type, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :prefs, :msg_send_type
|
||||
remove_column :prefs, :msgs_per_page
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddUseSslToServers < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :servers, :use_ssl, :boolean
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :servers, :use_ssl, :boolean
|
||||
end
|
||||
end
|
|
@ -1,17 +0,0 @@
|
|||
class CreateFolders < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :folders do |t|
|
||||
t.string :name
|
||||
t.string :delim
|
||||
t.string :attribs
|
||||
t.integer :messages
|
||||
t.integer :new
|
||||
t.references :user
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :folders
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
class RenameAttribsInFolders < ActiveRecord::Migration
|
||||
def self.up
|
||||
rename_column :folders,:attribs,:haschildren
|
||||
change_column :folders,:haschildren,:boolean
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :folders,:haschildren,:string
|
||||
rename_column :folders,:haschildren,:attribs
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class ChangeNewInFolder < ActiveRecord::Migration
|
||||
def self.up
|
||||
rename_column :folders,:new,:unseen
|
||||
end
|
||||
|
||||
def self.down
|
||||
rename_column :folders,:unseen,:new
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddColumnToFolder < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :folders, :parent, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :folders, :parent
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddColumnMsgsToFolder < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :folders, :msgs_updated_at, :datetime
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :folders, :msgs_updated_at
|
||||
end
|
||||
end
|
|
@ -1,23 +0,0 @@
|
|||
class CreateMessages < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :messages ,:id => false do |t|
|
||||
t.integer :folder_id
|
||||
t.integer :user_id
|
||||
t.string :msg_id
|
||||
t.string :from
|
||||
t.string :to
|
||||
t.string :subject
|
||||
t.string :content_type
|
||||
t.integer :uid
|
||||
t.integer :size
|
||||
t.boolean :unread
|
||||
t.datetime :date
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :messages
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
class AddShownToFolders < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :folders, :shown, :boolean
|
||||
add_column :folders, :alter_name, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :folders, :alter_name
|
||||
remove_column :folders, :shown
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class RenameMEssagesInFolder < ActiveRecord::Migration
|
||||
def self.up
|
||||
rename_column :folders,:messages,:total
|
||||
end
|
||||
|
||||
def self.down
|
||||
rename_column :folders,:total,:messages
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class RenameUnseenInMessage < ActiveRecord::Migration
|
||||
def self.up
|
||||
rename_column :messages, :unread, :unseen
|
||||
end
|
||||
|
||||
def self.down
|
||||
rename_column :messages, :unseen, :unread
|
||||
end
|
||||
end
|
|
@ -1,17 +0,0 @@
|
|||
class CreateContacts < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :contacts do |t|
|
||||
t.string :nick
|
||||
t.string :email
|
||||
t.string :first_name
|
||||
t.string :last_name
|
||||
t.string :info
|
||||
t.references :user
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :contacts
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
class RenameFromColumnInMessages < ActiveRecord::Migration
|
||||
def self.up
|
||||
rename_column :messages, :from, :from_addr
|
||||
rename_column :messages, :to, :to_addr
|
||||
end
|
||||
|
||||
def self.down
|
||||
rename_column :messages, :from_addr, :from
|
||||
rename_column :messages, :to_addr, :to
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class RemoveMsgsUpdateFromMessages < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_column :folders, :msgs_updated_at
|
||||
end
|
||||
|
||||
def self.down
|
||||
add_column :folders, :msgs_updated_at, :datetime
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
class AddOptionsToServers < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :servers,:use_tls,:boolean
|
||||
add_column :servers,:for_imap,:boolean
|
||||
add_column :servers,:for_smtp,:boolean
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :servers,:use_tls
|
||||
remove_column :servers,:for_imap
|
||||
remove_column :servers,:for_smtp
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddDomainToUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :users, :domain, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :users, :domain
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddTypeToFolders < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :folders, :sys, :integer
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :folders, :sys
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddAuthToServers < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :servers, :auth, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :servers, :auth
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
class AddMsgParamsToPrefs < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :prefs, :msg_image_view_as, :string
|
||||
add_column :prefs, :msg_image_thumbnail_size, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :prefs, :msg_image_thumbnail_size
|
||||
remove_column :prefs, :msg_image_view_as
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class RenameEmailInUser < ActiveRecord::Migration
|
||||
def self.up
|
||||
rename_column :users, :email, :login
|
||||
end
|
||||
|
||||
def self.down
|
||||
rename_column :users, :login, :email
|
||||
end
|
||||
end
|
|
@ -1,17 +0,0 @@
|
|||
class CreateLinks < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :links do |t|
|
||||
t.integer :user_id
|
||||
t.integer :lgroup_id
|
||||
t.string :name
|
||||
t.string :url
|
||||
t.string :info
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :links
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue