diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20210614004827_create_item_infixes.rb | 11 | ||||
-rw-r--r-- | db/migrate/20210616014044_create_monster_kills.rb | 11 | ||||
-rw-r--r-- | db/schema.rb | 28 |
3 files changed, 49 insertions, 1 deletions
diff --git a/db/migrate/20210614004827_create_item_infixes.rb b/db/migrate/20210614004827_create_item_infixes.rb new file mode 100644 index 0000000..5b49892 --- /dev/null +++ b/db/migrate/20210614004827_create_item_infixes.rb @@ -0,0 +1,11 @@ +class CreateItemInfixes < ActiveRecord::Migration[6.1] + def change + create_table :item_infixes do |t| + t.references :character, null: false, foreign_key: true + t.references :item, null: false, foreign_key: true + t.references :skill, null: false, foreign_key: true + + t.timestamps + end + end +end diff --git a/db/migrate/20210616014044_create_monster_kills.rb b/db/migrate/20210616014044_create_monster_kills.rb new file mode 100644 index 0000000..b61908d --- /dev/null +++ b/db/migrate/20210616014044_create_monster_kills.rb @@ -0,0 +1,11 @@ +class CreateMonsterKills < ActiveRecord::Migration[6.1] + def change + create_table :monster_kills do |t| + t.references :monster, null: false, foreign_key: true + t.references :character, null: false, foreign_key: true + t.bigint :quantity + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 75ebad0..6c503fd 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_06_10_010413) do +ActiveRecord::Schema.define(version: 2021_06_16_014044) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -156,6 +156,17 @@ ActiveRecord::Schema.define(version: 2021_06_10_010413) do t.index ["character_id"], name: "index_hearths_on_character_id" end + create_table "item_infixes", force: :cascade do |t| + t.bigint "character_id", null: false + t.bigint "item_id", null: false + t.bigint "skill_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["character_id"], name: "index_item_infixes_on_character_id" + t.index ["item_id"], name: "index_item_infixes_on_item_id" + t.index ["skill_id"], name: "index_item_infixes_on_skill_id" + end + create_table "items", force: :cascade do |t| t.string "gid" t.string "name" @@ -196,6 +207,16 @@ ActiveRecord::Schema.define(version: 2021_06_10_010413) do t.index ["sender_id"], name: "index_messages_on_sender_id" end + create_table "monster_kills", force: :cascade do |t| + t.bigint "monster_id", null: false + t.bigint "character_id", null: false + t.bigint "quantity" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["character_id"], name: "index_monster_kills_on_character_id" + t.index ["monster_id"], name: "index_monster_kills_on_monster_id" + end + create_table "monster_spawn_combats", force: :cascade do |t| t.bigint "monster_spawn_id", null: false t.bigint "character_id", null: false @@ -308,10 +329,15 @@ ActiveRecord::Schema.define(version: 2021_06_10_010413) do add_foreign_key "hearth_plantings", "hearths" add_foreign_key "hearth_plantings", "items" add_foreign_key "hearths", "characters" + add_foreign_key "item_infixes", "characters" + add_foreign_key "item_infixes", "items" + add_foreign_key "item_infixes", "skills" add_foreign_key "learned_activities", "activities" add_foreign_key "learned_activities", "characters" add_foreign_key "messages", "characters", column: "recipient_id" add_foreign_key "messages", "characters", column: "sender_id" + add_foreign_key "monster_kills", "characters" + add_foreign_key "monster_kills", "monsters" add_foreign_key "monster_spawn_combats", "characters" add_foreign_key "monster_spawn_combats", "monster_spawns" add_foreign_key "monster_spawns", "locations" |