Add new fields to parties table and raids table

This commit is contained in:
Justin Edmund 2022-02-23 18:00:12 -08:00
parent 29c3415df2
commit 6175c909ee
2 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,13 @@
class AddDetailsToParty < ActiveRecord::Migration[6.1]
def change
create_table :raids, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
t.string :name_en
t.string :name_jp
t.integer :level
end
add_column :parties, :name, :string
add_column :parties, :description, :text
add_reference :parties, :raids, index: true
end
end

View file

@ -10,12 +10,11 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_02_23_213548) do
ActiveRecord::Schema.define(version: 2022_02_24_015505) do
# These are extensions that must be enabled in order to support this database
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"
@ -129,9 +128,19 @@ ActiveRecord::Schema.define(version: 2022_02_23_213548) do
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.boolean "extra", default: false, null: false
t.string "name"
t.text "description"
t.bigint "raids_id"
t.index ["raids_id"], name: "index_parties_on_raids_id"
t.index ["user_id"], name: "index_parties_on_user_id"
end
create_table "raids", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.string "name_en"
t.string "name_jp"
t.integer "level"
end
create_table "summons", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.string "name_en"
t.string "name_jp"