OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
user check
[pettanr/pettanr.git]
/
db
/
migrate
/
20111206091950_create_authors.rb
1
class CreateAuthors < ActiveRecord::Migration
2
def change
3
create_table(:authors) do |t|
4
t.string :name
\r
5
t.integer :user_id, :null => false, :default => 0
\r
6
7
t.timestamps
8
end
9
10
add_index :authors, :user_id, :unique => true
11
end
12
13
end