snippets are ready
This commit is contained in:
parent
526ad466c8
commit
9265de3d25
28 changed files with 366 additions and 8 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
|
Loading…
Add table
Add a link
Reference in a new issue