This commit is contained in:
Dmitriy Zaporozhets 2011-10-21 20:04:41 +03:00
parent 3a2b273316
commit 6b030fd41d
83 changed files with 1089 additions and 136 deletions

View file

@ -0,0 +1,12 @@
class CreateSnippets < ActiveRecord::Migration
def change
create_table :snippets do |t|
t.string :title
t.text :content
t.integer :author_id, :null => false
t.integer :project_id, :null => false
t.timestamps
end
end
end

View file

@ -0,0 +1,5 @@
class AddContentTypeToSnippets < ActiveRecord::Migration
def change
add_column :snippets, :content_type, :string, :null => false, :default => "txt"
end
end

View file

@ -0,0 +1,6 @@
class AddFileNameToSnippets < ActiveRecord::Migration
def change
add_column :snippets, :file_name, :string
remove_column :snippets, :content_type
end
end

View file

@ -0,0 +1,7 @@
class AddSocialToUser < ActiveRecord::Migration
def change
add_column :users, :skype, :string
add_column :users, :linkedin, :string
add_column :users, :twitter, :string
end
end

View file

@ -0,0 +1,14 @@
class ChangeSocialFieldsInUsers < ActiveRecord::Migration
def up
remove_column :users, :skype
remove_column :users, :linkedin
remove_column :users, :twitter
add_column :users, :skype, :string, {:null => false, :default => ''}
add_column :users, :linkedin, :string, {:null => false, :default => ''}
add_column :users, :twitter, :string, {:null => false, :default => ''}
end
def down
end
end