add geo info and do refractor on workers

This commit is contained in:
2021-04-29 20:44:21 +02:00
parent f7799bb514
commit c5190b48f8
32 changed files with 241 additions and 205 deletions

View 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

View 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

View 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

View File

@@ -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