1.1pre1
This commit is contained in:
parent
3a2b273316
commit
6b030fd41d
83 changed files with 1089 additions and 136 deletions
12
db/migrate/20111016183422_create_snippets.rb
Normal file
12
db/migrate/20111016183422_create_snippets.rb
Normal 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
|
|
@ -0,0 +1,5 @@
|
|||
class AddContentTypeToSnippets < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :snippets, :content_type, :string, :null => false, :default => "txt"
|
||||
end
|
||||
end
|
6
db/migrate/20111016195506_add_file_name_to_snippets.rb
Normal file
6
db/migrate/20111016195506_add_file_name_to_snippets.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
class AddFileNameToSnippets < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :snippets, :file_name, :string
|
||||
remove_column :snippets, :content_type
|
||||
end
|
||||
end
|
7
db/migrate/20111019212429_add_social_to_user.rb
Normal file
7
db/migrate/20111019212429_add_social_to_user.rb
Normal 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
|
14
db/migrate/20111021101550_change_social_fields_in_users.rb
Normal file
14
db/migrate/20111021101550_change_social_fields_in_users.rb
Normal 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
|
15
db/schema.rb
15
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20111015154310) do
|
||||
ActiveRecord::Schema.define(:version => 20111021101550) do
|
||||
|
||||
create_table "issues", :force => true do |t|
|
||||
t.string "title"
|
||||
|
@ -56,6 +56,16 @@ ActiveRecord::Schema.define(:version => 20111015154310) do
|
|||
t.integer "owner_id"
|
||||
end
|
||||
|
||||
create_table "snippets", :force => true do |t|
|
||||
t.string "title"
|
||||
t.text "content"
|
||||
t.integer "author_id", :null => false
|
||||
t.integer "project_id", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "file_name"
|
||||
end
|
||||
|
||||
create_table "users", :force => true do |t|
|
||||
t.string "email", :default => "", :null => false
|
||||
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
||||
|
@ -72,6 +82,9 @@ ActiveRecord::Schema.define(:version => 20111015154310) do
|
|||
t.string "name"
|
||||
t.boolean "admin", :default => false, :null => false
|
||||
t.integer "projects_limit", :default => 10
|
||||
t.string "skype", :default => "", :null => false
|
||||
t.string "linkedin", :default => "", :null => false
|
||||
t.string "twitter", :default => "", :null => false
|
||||
end
|
||||
|
||||
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue