adding stories, scaffold

This commit is contained in:
2023-01-11 18:48:06 +02:00
parent 10686d1f5e
commit 23a2254d2e
18 changed files with 289 additions and 27 deletions

View File

@ -0,0 +1,12 @@
class CreateStories < ActiveRecord::Migration[7.0]
def change
create_table :stories do |t|
t.string :picture
t.string :header
t.text :text
t.date :happened
t.timestamps
end
end
end

11
db/schema.rb generated
View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2022_12_31_154221) do
ActiveRecord::Schema[7.0].define(version: 2023_01_11_164425) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -46,6 +46,15 @@ ActiveRecord::Schema[7.0].define(version: 2022_12_31_154221) do
t.index ["reset_password_token"], name: "index_members_on_reset_password_token", unique: true
end
create_table "stories", force: :cascade do |t|
t.string "picture"
t.string "header"
t.text "text"
t.date "happened"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "thredded_categories", force: :cascade do |t|
t.bigint "messageboard_id", null: false
t.text "name", null: false