diff --git a/db/migrate/20230124000252_create_job_accessories.rb b/db/migrate/20230124000252_create_job_accessories.rb new file mode 100644 index 0000000..a016365 --- /dev/null +++ b/db/migrate/20230124000252_create_job_accessories.rb @@ -0,0 +1,14 @@ +class CreateJobAccessories < ActiveRecord::Migration[7.0] + def change + create_table :job_accessories, id: :uuid, default: -> { "gen_random_uuid()" } do |t| + t.references :job, type: :uuid + + t.string :name_en, null: false, unique: true + t.string :name_jp, null: false, unique: true + t.string :granblue_id, null: false, unique: true + + t.integer :rarity + t.date :release_date + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 36444f5..46b1d0f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,13 +10,12 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_01_23_055508) do +ActiveRecord::Schema[7.0].define(version: 2023_01_24_000252) do # These are extensions that must be enabled in order to support this database enable_extension "btree_gin" enable_extension "pg_trgm" enable_extension "pgcrypto" enable_extension "plpgsql" - enable_extension "timescaledb" create_table "characters", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name_en" @@ -115,6 +114,16 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_23_055508) do t.index ["weapon_key3_id"], name: "index_grid_weapons_on_weapon_key3_id" end + create_table "job_accessories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.uuid "job_id" + t.string "name_en", null: false + t.string "name_jp", null: false + t.string "granblue_id", null: false + t.integer "rarity" + t.date "release_date" + t.index ["job_id"], name: "index_job_accessories_on_job_id" + end + create_table "job_skills", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "job_id" t.string "name_en", null: false