class CreatePlatformLinks < ActiveRecord::Migration[8.1]
  def change
    create_table :platform_links, id: { type: :bigint, unsigned: true },
                                   charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci",
                                   if_not_exists: true do |t|
      t.datetime :created_at,  precision: 3
      t.datetime :deleted_at,  precision: 3
      t.string   :name,        limit: 128
      t.string   :platform,    limit: 128
      t.integer  :position,    default: 0, null: false
      t.datetime :updated_at,  precision: 3
      t.string   :url

      t.index :deleted_at, name: "idx_platform_links_deleted_at"
      t.index :platform,   name: "idx_platform_links_platform"
    end
  end
end
