Mercurial > zeropaste
diff db/migrate/20120826180414_create_pastes.rb @ 2:42de15334db1
Added the pastes.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Sun, 26 Aug 2012 11:28:23 -0700 |
parents | |
children | 682abad78313 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/db/migrate/20120826180414_create_pastes.rb Sun Aug 26 11:28:23 2012 -0700 @@ -0,0 +1,12 @@ +class CreatePastes < ActiveRecord::Migration + def change + create_table :pastes do |t| + t.string :ip, :null => false + t.text :paste, :null => false + t.string :hash, :null => false + + t.timestamps + end + add_index :pastes, [:ip, :hash], :unique => true + end +end