add geo info and do refractor on workers
This commit is contained in:
12
db/migrate/20210429160238_create_wow_geo_zones.rb
Normal file
12
db/migrate/20210429160238_create_wow_geo_zones.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateWowGeoZones < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :wow_geo_zones do |t|
|
||||
t.integer :zone_id
|
||||
t.jsonb :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :wow_geo_zones, :zone_id, unique: true
|
||||
end
|
||||
end
|
||||
12
db/migrate/20210429160323_create_wow_geo_maps.rb
Normal file
12
db/migrate/20210429160323_create_wow_geo_maps.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateWowGeoMaps < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :wow_geo_maps do |t|
|
||||
t.integer :map_id
|
||||
t.jsonb :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :wow_geo_maps, :map_id, unique: true
|
||||
end
|
||||
end
|
||||
14
db/migrate/20210429160459_create_wow_geo_positions.rb
Normal file
14
db/migrate/20210429160459_create_wow_geo_positions.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateWowGeoPositions < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :wow_geo_positions do |t|
|
||||
t.float :x
|
||||
t.float :y
|
||||
t.float :z
|
||||
t.float :facing
|
||||
t.belongs_to :wow_geo_zone
|
||||
t.belongs_to :wow_geo_map
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
class AddWowGeoPositionToWowCharacter < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :wow_characters, :last_position_id, :bigint
|
||||
add_column :wow_characters, :bind_position_id, :bigint
|
||||
|
||||
add_foreign_key :wow_characters, :wow_geo_positions, column: :last_position_id, primary_key: :id
|
||||
add_foreign_key :wow_characters, :wow_geo_positions, column: :bind_position_id, primary_key: :id
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user