2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/generators/orochi/templates/migrations/migration.rb', line 2
def self.up
create_table :routers do |t|
t.string :start
t.string :stop
t.timestamps
end
create_table :routes do |t|
t.integer :router_id, :references => :routers
t.timestamps
end
create_table :legs do |t|
t.integer :route_id, :references => :routes
t.timestamps
end
create_table :steps do |t|
t.integer :leg_id, :references => :legs
t.text :polyline_json
t.text :directions_json
t.timestamps
end
end
|