Add summary column to timelogs table
We currently reference the note_id
when a timelog is added via a quick action, but there is a desire to be able to add a summary "note" to the timelog itself.
This introduces the database field for us to build the backend.
Migrations:
lee@cc-gdk-2:~/gitlab-development-kit/gitlab$ bundle exec rake db:migrate:up VERSION=20210621084632 RAILS_ENV=development
== 20210621084632 AddSummaryToTimelogs: migrating =============================
-- add_column(:timelogs, :summary, :text)
-> 0.0018s
== 20210621084632 AddSummaryToTimelogs: migrated (0.0018s) ====================
lee@cc-gdk-2:~/gitlab-development-kit/gitlab$ bundle exec rake db:migrate:up VERSION=20210621090030 RAILS_ENV=development
== 20210621090030 AddTextLimitToTimelogsSummary: migrating ====================
-- transaction_open?()
-> 0.0000s
-- current_schema()
-> 0.0003s
-- execute("ALTER TABLE timelogs\nADD CONSTRAINT check_271d321699\nCHECK ( char_length(summary) <= 255 )\nNOT VALID;\n")
-> 0.0009s
-- current_schema()
-> 0.0002s
-- execute("SET statement_timeout TO 0")
-> 0.0004s
-- execute("ALTER TABLE timelogs VALIDATE CONSTRAINT check_271d321699;")
-> 0.0007s
-- execute("RESET ALL")
-> 0.0004s
== 20210621090030 AddTextLimitToTimelogsSummary: migrated (0.0106s) ===========
lee@cc-gdk-2:~/gitlab-development-kit/gitlab$ bundle exec rake db:migrate:down VERSION=20210621090030 RAILS_ENV=development
== 20210621090030 AddTextLimitToTimelogsSummary: reverting ====================
-- execute("ALTER TABLE timelogs\nDROP CONSTRAINT IF EXISTS check_271d321699\n")
-> 0.0011s
== 20210621090030 AddTextLimitToTimelogsSummary: reverted (0.0055s) ===========
lee@cc-gdk-2:~/gitlab-development-kit/gitlab$ bundle exec rake db:migrate:down VERSION=20210621084632 RAILS_ENV=development
== 20210621084632 AddSummaryToTimelogs: reverting =============================
-- remove_column(:timelogs, :summary, :text)
-> 0.0018s
== 20210621084632 AddSummaryToTimelogs: reverted (0.0032s) ====================
Edited by Lee Tickett