Add design description column
What does this MR do and why?
Adds description
markdown field to Design model.
This field will be added to API in a separate merge request.
Related to #388448 (closed)
DB migration
DB migration output
# UP
main: == 20230228133011 AddDesignDescription: migrating =============================
main: -- add_column(:design_management_designs, :cached_markdown_version, :integer)
main: -> 0.0014s
main: -- add_column(:design_management_designs, :description, :text)
main: -> 0.0005s
main: -- add_column(:design_management_designs, :description_html, :text)
main: -> 0.0004s
main: == 20230228133011 AddDesignDescription: migrated (0.0068s) ====================
main: == 20230228135034 AddDesignDescriptionLimit: migrating ========================
main: -- transaction_open?()
main: -> 0.0000s
main: -- current_schema()
main: -> 0.0004s
main: -- transaction_open?()
main: -> 0.0000s
main: -- execute("ALTER TABLE design_management_designs\nADD CONSTRAINT check_aaf9fa6ae5\nCHECK ( char_length(description) <= 1000000 )\nNOT VALID;\n")
main: -> 0.0006s
main: -- current_schema()
main: -> 0.0003s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0004s
main: -- execute("ALTER TABLE design_management_designs VALIDATE CONSTRAINT check_aaf9fa6ae5;")
main: -> 0.0018s
main: -- execute("RESET statement_timeout")
main: -> 0.0003s
main: == 20230228135034 AddDesignDescriptionLimit: migrated (0.0552s) ===============
ci: == 20230228133011 AddDesignDescription: migrating =============================
ci: -- add_column(:design_management_designs, :cached_markdown_version, :integer)
ci: -> 0.0008s
ci: -- add_column(:design_management_designs, :description, :text)
ci: -> 0.0006s
ci: -- add_column(:design_management_designs, :description_html, :text)
ci: -> 0.0004s
ci: == 20230228133011 AddDesignDescription: migrated (0.0102s) ====================
ci: == 20230228135034 AddDesignDescriptionLimit: migrating ========================
ci: -- transaction_open?()
ci: -> 0.0000s
ci: -- current_schema()
ci: -> 0.0003s
ci: -- transaction_open?()
ci: -> 0.0000s
ci: -- execute("ALTER TABLE design_management_designs\nADD CONSTRAINT check_aaf9fa6ae5\nCHECK ( char_length(description) <= 1000000 )\nNOT VALID;\n")
ci: -> 0.0009s
ci: -- current_schema()
ci: -> 0.0002s
ci: -- execute("SET statement_timeout TO 0")
ci: -> 0.0003s
ci: -- execute("ALTER TABLE design_management_designs VALIDATE CONSTRAINT check_aaf9fa6ae5;")
ci: -> 0.0015s
ci: -- execute("RESET statement_timeout")
ci: -> 0.0003s
ci: == 20230228135034 AddDesignDescriptionLimit: migrated (0.0167s) ===============
# DOWN
main: == 20230228135034 AddDesignDescriptionLimit: reverting ========================
main: -- transaction_open?()
main: -> 0.0000s
main: -- transaction_open?()
main: -> 0.0000s
main: -- execute(" ALTER TABLE design_management_designs\n DROP CONSTRAINT IF EXISTS check_aaf9fa6ae5\n")
main: -> 0.0007s
main: == 20230228135034 AddDesignDescriptionLimit: reverted (0.0176s) ===============
main: == 20230228133011 AddDesignDescription: reverting =============================
main: -- remove_column(:design_management_designs, :cached_markdown_version)
main: -> 0.0007s
main: -- remove_column(:design_management_designs, :description)
main: -> 0.0004s
main: -- remove_column(:design_management_designs, :description_html)
main: -> 0.0005s
main: == 20230228133011 AddDesignDescription: reverted (0.0050s) ====================
ci: == 20230228135034 AddDesignDescriptionLimit: reverting ========================
ci: -- transaction_open?()
ci: -> 0.0002s
ci: -- transaction_open?()
ci: -> 0.0000s
ci: -- execute(" ALTER TABLE design_management_designs\n DROP CONSTRAINT IF EXISTS check_aaf9fa6ae5\n")
ci: -> 0.0008s
ci: == 20230228135034 AddDesignDescriptionLimit: reverted (0.0218s) ===============
ci: == 20230228133011 AddDesignDescription: reverting =============================
ci: -- remove_column(:design_management_designs, :cached_markdown_version)
ci: -> 0.0005s
ci: -- remove_column(:design_management_designs, :description)
ci: -> 0.0004s
ci: -- remove_column(:design_management_designs, :description_html)
ci: -> 0.0004s
ci: == 20230228133011 AddDesignDescription: reverted (0.0091s) ====================
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Jan Provaznik