diff --git a/db/migrate/20240821114908_change_local_path_type.rb b/db/migrate/20240821114908_change_local_path_type.rb index 83e0789e9..5c2f53cce 100644 --- a/db/migrate/20240821114908_change_local_path_type.rb +++ b/db/migrate/20240821114908_change_local_path_type.rb @@ -1,8 +1,8 @@ class ChangeLocalPathType < ActiveRecord::Migration[6.1] def up safety_assured do - change_column :repositories, :local_path, :text - change_column :downloaded_files, :local_path, :text + change_column :repositories, :local_path, :string, limit: 512 + change_column :downloaded_files, :local_path, :string, limit: 512 end end diff --git a/db/schema.rb b/db/schema.rb index bf4ce342e..70a68e684 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -34,7 +34,7 @@ create_table "downloaded_files", charset: "utf8", force: :cascade do |t| t.string "checksum_type" t.string "checksum" - t.text "local_path" + t.text "local_path", limit: 512 t.bigint "file_size", unsigned: true t.index ["checksum_type", "checksum"], name: "index_downloaded_files_on_checksum_type_and_checksum" t.index ["local_path"], name: "index_downloaded_files_on_local_path", unique: true @@ -104,7 +104,7 @@ t.string "auth_token" t.boolean "installer_updates", default: false, null: false t.boolean "mirroring_enabled", default: false, null: false - t.text "local_path", null: false + t.text "local_path", limit: 512, null: false t.datetime "last_mirrored_at" t.string "friendly_id" t.index ["external_url"], name: "index_repositories_on_external_url", unique: true