\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index a125ef08..7eb4f422 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -6,5 +6,7 @@
get "up" => "rails/health#show", as: :rails_health_check
# Defines the root path route ("/")
- # root "posts#index"
+ root "articles#index"
+
+ resources :articles
end
diff --git a/db/migrate/20240129061916_create_articles.rb b/db/migrate/20240129061916_create_articles.rb
new file mode 100644
index 00000000..a048b0f9
--- /dev/null
+++ b/db/migrate/20240129061916_create_articles.rb
@@ -0,0 +1,12 @@
+class CreateArticles < ActiveRecord::Migration[7.1]
+ def change
+ create_table :articles do |t|
+ t.string :title
+ t.text :content
+ t.text :author
+ t.date :date
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
new file mode 100644
index 00000000..dff6f3d2
--- /dev/null
+++ b/db/schema.rb
@@ -0,0 +1,24 @@
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# This file is the source Rails uses to define your schema when running `bin/rails
+# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
+# be faster and is potentially less error prone than running all of your
+# migrations from scratch. Old migrations may fail to apply correctly if those
+# migrations use external dependencies or application code.
+#
+# It's strongly recommended that you check this file into your version control system.
+
+ActiveRecord::Schema[7.1].define(version: 2024_01_29_061916) do
+ create_table "articles", force: :cascade do |t|
+ t.string "title"
+ t.text "content"
+ t.text "author"
+ t.date "date"
+
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ end
+
+end
diff --git a/test/controllers/articles_controller_test.rb b/test/controllers/articles_controller_test.rb
new file mode 100644
index 00000000..0a82cbb1
--- /dev/null
+++ b/test/controllers/articles_controller_test.rb
@@ -0,0 +1,7 @@
+require "test_helper"
+
+class ArticlesControllerTest < ActionDispatch::IntegrationTest
+ # test "the truth" do
+ # assert true
+ # end
+end