summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2023-11-02 18:43:53 -0400
committerDavid Gay <david@davidgay.org>2023-11-02 18:43:53 -0400
commit11b7be5c41edda171a05e92295c51320cb315c68 (patch)
treece15d742c594bde20b1d16629fca21a2a7ccf5b9 /db
parent7fb0491b7954f59964b8f2153dce42855b50141f (diff)
Update checkpoints to have comment instead of title+desc, and display them
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20231102223203_remove_title_from_checkpoints.rb11
-rw-r--r--db/schema.rb5
2 files changed, 13 insertions, 3 deletions
diff --git a/db/migrate/20231102223203_remove_title_from_checkpoints.rb b/db/migrate/20231102223203_remove_title_from_checkpoints.rb
new file mode 100644
index 0000000..92e54a0
--- /dev/null
+++ b/db/migrate/20231102223203_remove_title_from_checkpoints.rb
@@ -0,0 +1,11 @@
+class RemoveTitleFromCheckpoints < ActiveRecord::Migration[7.1]
+ def up
+ remove_column :checkpoints, :title
+ rename_column :checkpoints, :description, :comment
+ end
+
+ def down
+ rename_column :checkpoints, :comment, :description
+ add_column :checkpoints, :title, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index b48737d..0982ec0 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[7.1].define(version: 2023_10_31_053134) do
+ActiveRecord::Schema[7.1].define(version: 2023_11_02_223203) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -43,8 +43,7 @@ ActiveRecord::Schema[7.1].define(version: 2023_10_31_053134) do
end
create_table "checkpoints", force: :cascade do |t|
- t.string "title"
- t.text "description"
+ t.text "comment"
t.bigint "run_id", null: false
t.bigint "user_id", null: false
t.datetime "created_at", null: false