diff options
author | Go MAEDA <maeda@farend.jp> | 2022-07-17 04:40:01 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-07-17 04:40:01 +0000 |
commit | f52b3f90eb04bf312472660b35aae8edc15eb5d5 (patch) | |
tree | 06cc36220ef2dd0a5284ee28bd9a705a471e4305 /db/migrate | |
parent | 0afe0cf609b67f50e2758ec03f4dce0a322f91cb (diff) | |
download | redmine-f52b3f90eb04bf312472660b35aae8edc15eb5d5.tar.gz redmine-f52b3f90eb04bf312472660b35aae8edc15eb5d5.zip |
Mark edited journal notes as "Edited" (#31505).
Patch by Marius BALTEANU.
git-svn-id: https://svn.redmine.org/redmine/trunk@21713 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20220714093000_add_journal_updated_on.rb | 10 | ||||
-rw-r--r-- | db/migrate/20220714093010_add_journal_updated_by.rb | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20220714093000_add_journal_updated_on.rb b/db/migrate/20220714093000_add_journal_updated_on.rb new file mode 100644 index 000000000..bf2c1b0cd --- /dev/null +++ b/db/migrate/20220714093000_add_journal_updated_on.rb @@ -0,0 +1,10 @@ +class AddJournalUpdatedOn < ActiveRecord::Migration[5.2] + def up + add_column :journals, :updated_on, :datetime, :after => :created_on + Journal.update_all('updated_on = created_on') + end + + def down + remove_column :journals, :updated_on + end +end diff --git a/db/migrate/20220714093010_add_journal_updated_by.rb b/db/migrate/20220714093010_add_journal_updated_by.rb new file mode 100644 index 000000000..02bf65e54 --- /dev/null +++ b/db/migrate/20220714093010_add_journal_updated_by.rb @@ -0,0 +1,9 @@ +class AddJournalUpdatedBy < ActiveRecord::Migration[5.2] + def up + add_column :journals, :updated_by_id, :integer, :default => nil, :after => :updated_on + end + + def down + remove_column :journals, :updated_by_id + end +end |