Remove foods

This commit is contained in:
Trevor Vallender 2023-12-29 14:37:38 +00:00
parent c4d64e40a5
commit 7ff8075d64
5 changed files with 6 additions and 24 deletions

View File

@ -1,3 +0,0 @@
class Food < ApplicationRecord
validates :name, presence: true
end

View File

@ -1,9 +0,0 @@
class CreateFoods < ActiveRecord::Migration[7.1]
def change
create_table :foods do |t|
t.text :name, null: false
t.timestamps
end
end
end

View File

@ -0,0 +1,5 @@
class DropFoods < ActiveRecord::Migration[7.1]
def change
drop_table :foods
end
end

8
db/schema.rb generated
View File

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2023_12_29_121659) do ActiveRecord::Schema[7.1].define(version: 2023_12_29_143648) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -96,12 +96,6 @@ ActiveRecord::Schema[7.1].define(version: 2023_12_29_121659) do
t.index ["exercise_type_id"], name: "index_exercises_on_exercise_type_id" t.index ["exercise_type_id"], name: "index_exercises_on_exercise_type_id"
end end
create_table "foods", force: :cascade do |t|
t.text "name", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "microposts", force: :cascade do |t| create_table "microposts", force: :cascade do |t|
t.bigint "user_id", null: false t.bigint "user_id", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false

View File

@ -1,5 +0,0 @@
one:
name: Pizza
two:
name: Banana