repo.or.cz
/
gitorious.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Handle not ready repos
[gitorious.git]
/
db
/
migrate
/
20090303084023_create_sites.rb
blob
6b560306b8544f4a7af995bde9c2005a54492f0e
1
class CreateSites < ActiveRecord::Migration
2
def self.up
3
transaction do
4
create_table :sites do |t|
5
t.string :title
6
t.string :subdomain
7
t.timestamps
8
end
9
add_index :sites, :subdomain
10
11
add_column :projects, :site_id, :integer
12
add_index :projects, :site_id
13
end
14
end
15
16
def self.down
17
transaction do
18
drop_table :sites
19
remove_column :projects, :site_id
20
end
21
end
22
end