Add job accessories table
This commit is contained in:
parent
95748db677
commit
7de4bb6863
2 changed files with 25 additions and 2 deletions
14
db/migrate/20230124000252_create_job_accessories.rb
Normal file
14
db/migrate/20230124000252_create_job_accessories.rb
Normal file
|
|
@ -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
|
||||
13
db/schema.rb
13
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue