snippets are ready

This commit is contained in:
gitlabhq 2011-10-17 00:07:10 +03:00
parent 526ad466c8
commit 9265de3d25
28 changed files with 366 additions and 8 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

@ -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 => 20111016195506) 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