feat: オリジナルの作成日時追加( #101 ) (#117)

#101 オリジナルの作成日時(より前)の自動設定

#101 余白追加

#101 余白追加

#101 オリジナルの作成日時,フォームにフィールド追加

#101 マイグレとコントローラ

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #117
This commit was merged in pull request #117.
This commit is contained in:
2025-09-22 05:05:30 +09:00
parent 3119d475e5
commit 6bca0215d8
9 changed files with 194 additions and 28 deletions
@@ -0,0 +1,6 @@
class AddOriginalCreatedAtToPosts < ActiveRecord::Migration[8.0]
def change
add_column :posts, :original_created_from, :datetime, after: :created_at
add_column :posts, :original_created_before, :datetime, after: :original_created_from
end
end
+3 -1
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2025_07_29_210600) do
ActiveRecord::Schema[8.0].define(version: 2025_09_09_075500) do
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -83,6 +83,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_07_29_210600) do
t.bigint "parent_id"
t.bigint "uploaded_user_id"
t.datetime "created_at", null: false
t.datetime "original_created_from"
t.datetime "original_created_before"
t.datetime "updated_at", null: false
t.index ["parent_id"], name: "index_posts_on_parent_id"
t.index ["uploaded_user_id"], name: "index_posts_on_uploaded_user_id"