summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-05-31 16:51:47 -0400
committerDavid Gay <david@davidgay.org>2021-05-31 16:51:47 -0400
commitdcbb8efcde93af6452af77fea6b1038784db477e (patch)
tree476f1ccde46a663f27a3183e5fa9b202fce89f39 /db/migrate
parent99e2507bea007e4aac17cf562139f53f7f9da9bf (diff)
Character resting
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20210531192205_add_resting_to_characters.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/db/migrate/20210531192205_add_resting_to_characters.rb b/db/migrate/20210531192205_add_resting_to_characters.rb
new file mode 100644
index 0000000..a53e4fa
--- /dev/null
+++ b/db/migrate/20210531192205_add_resting_to_characters.rb
@@ -0,0 +1,8 @@
+class AddRestingToCharacters < ActiveRecord::Migration[6.1]
+ def change
+ add_column :characters, :rested_duration, :integer
+ add_column :characters, :started_resting_at, :timestamp
+
+ Character.update_all(rested_duration: 0)
+ end
+end