Add table for data version and migrate
This commit is contained in:
parent
0e490df113
commit
645a939e12
2 changed files with 24 additions and 1 deletions
14
db/migrate/20250110070255_create_granblue_data_version.rb
Normal file
14
db/migrate/20250110070255_create_granblue_data_version.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateGranblueDataVersion < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :granblue_data_version do |t|
|
||||
t.string :filename, null: false
|
||||
t.datetime :imported_at, null: false
|
||||
|
||||
t.timestamps
|
||||
|
||||
t.index :filename, unique: true
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/schema.rb
11
db/schema.rb
|
|
@ -10,12 +10,13 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2024_01_26_032358) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2025_01_10_070255) 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 "uuid-ossp"
|
||||
|
||||
create_table "app_updates", primary_key: "updated_at", id: :datetime, force: :cascade do |t|
|
||||
t.string "update_type", null: false
|
||||
|
|
@ -104,6 +105,14 @@ ActiveRecord::Schema[7.0].define(version: 2024_01_26_032358) do
|
|||
t.index ["gacha_id"], name: "index_gacha_rateups_on_gacha_id"
|
||||
end
|
||||
|
||||
create_table "granblue_data_version", force: :cascade do |t|
|
||||
t.string "filename", null: false
|
||||
t.datetime "imported_at", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["filename"], name: "index_granblue_data_version_on_filename", unique: true
|
||||
end
|
||||
|
||||
create_table "grid_characters", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
t.uuid "party_id"
|
||||
t.uuid "character_id"
|
||||
|
|
|
|||
Loading…
Reference in a new issue