Model registry: Increase Description text limits
What does this MR do and why?
This MR adds a text limit to the field description
in both Ml::Model and Ml::ModelVersion.
Migration up
bin/rails db:migrate:up:main VERSION=20240824101146
main: == [advisory_lock_connection] object_id: 127380, pg_backend_pid: 92494
main: == 20240824101146 AddTextLimitModelDescription: migrating =====================
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- execute("ALTER TABLE ml_models\nADD CONSTRAINT check_d0c47d63b5\nCHECK ( char_length(description) <= 10000 )\nNOT VALID;\n")
main: -> 0.0012s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0005s
main: -- execute("ALTER TABLE ml_models VALIDATE CONSTRAINT check_d0c47d63b5;")
main: -> 0.0010s
main: -- execute("RESET statement_timeout")
main: -> 0.0005s
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- execute("ALTER TABLE ml_model_versions\nADD CONSTRAINT check_caff7d000b\nCHECK ( char_length(description) <= 10000 )\nNOT VALID;\n")
main: -> 0.0005s
main: -- execute("ALTER TABLE ml_model_versions VALIDATE CONSTRAINT check_caff7d000b;")
main: -> 0.0011s
main: == 20240824101146 AddTextLimitModelDescription: migrated (0.0422s) ============
main: == [advisory_lock_connection] object_id: 127380, pg_backend_pid: 92494
Migration down
bin/rails db:migrate:down:main VERSION=20240824101146
main: == [advisory_lock_connection] object_id: 127380, pg_backend_pid: 91543
main: == 20240824101146 AddTextLimitModelDescription: reverting =====================
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- execute(" ALTER TABLE ml_models\n DROP CONSTRAINT IF EXISTS check_d0c47d63b5\n")
main: -> 0.0010s
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- execute(" ALTER TABLE ml_model_versions\n DROP CONSTRAINT IF EXISTS check_caff7d000b\n")
main: -> 0.0007s
main: == 20240824101146 AddTextLimitModelDescription: reverted (0.0206s) ============
main: == [advisory_lock_connection] object_id: 127380, pg_backend_pid: 91543
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Related to #480525 (closed)
Edited by Fred de Gier