summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210531192205_add_resting_to_characters.rb8
-rw-r--r--db/schema.rb4
2 files changed, 11 insertions, 1 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
diff --git a/db/schema.rb b/db/schema.rb
index 5d9fffe..2a0b30a 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2021_05_29_195809) do
+ActiveRecord::Schema.define(version: 2021_05_31_192205) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -84,6 +84,8 @@ ActiveRecord::Schema.define(version: 2021_05_29_195809) do
t.integer "queued_actions"
t.integer "offensive_style"
t.integer "defensive_style"
+ t.integer "rested_duration"
+ t.datetime "started_resting_at"
t.index ["active_title_id"], name: "index_characters_on_active_title_id"
t.index ["activity_id"], name: "index_characters_on_activity_id"
t.index ["user_id"], name: "index_characters_on_user_id"