Increase model registry description text limits
What does this MR do and why?
Increase model registry description text limits
- rollback will not be applied because it can fail so applied
pipeline:skip-check-migrations
Related to #480525 (closed)
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.
Migration output
$ bin/rails db:migrate:main VERSION=20240824101146 RAILS_ENV=development
main: == [advisory_lock_connection] object_id: 127600, pg_backend_pid: 719484
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_f8df2fefc5\nCHECK ( char_length(description) <= 10000 )\nNOT VALID;\n")
main: -> 0.0011s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0005s
main: -- execute("ALTER TABLE ml_models VALIDATE CONSTRAINT check_f8df2fefc5;")
main: -> 0.0005s
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_f1545d8a9e\nCHECK ( char_length(description) <= 10000 )\nNOT VALID;\n")
main: -> 0.0008s
main: -- execute("ALTER TABLE ml_model_versions VALIDATE CONSTRAINT check_f1545d8a9e;")
main: -> 0.0004s
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.0004s
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.0004s
main: == 20240824101146 AddTextLimitModelDescription: migrated (0.0293s) ============
main: == [advisory_lock_connection] object_id: 127600, pg_backend_pid: 719484
aakgun@sayglubu:~/aakgun/1/gdk/gitlab$ bin/rails db:migrate:down:main VERSION=20240824101146 RAILS_ENV=development
main: == [advisory_lock_connection] object_id: 127320, pg_backend_pid: 720294
main: == 20240824101146 AddTextLimitModelDescription: reverting =====================
main: == 20240824101146 AddTextLimitModelDescription: reverted (0.0030s) ============
main: == [advisory_lock_connection] object_id: 127320, pg_backend_pid: 720294
Rollback is a noop
bin/rails db:migrate:down:main VERSION=20240824101146 RAILS_ENV=development
main: == [advisory_lock_connection] object_id: 127320, pg_backend_pid: 773049
main: == 20240824101146 AddTextLimitModelDescription: reverting =====================
main: == 20240824101146 AddTextLimitModelDescription: reverted (0.0029s) ============
main: == [advisory_lock_connection] object_id: 127320, pg_backend_pid: 773049
How to set up and validate locally
Edited by Alper Akgun