TheOdinProject / theodinproject

Main Website for The Odin Project
http://www.theodinproject.com
MIT License
3.72k stars 2.07k forks source link

Cannot do Migration #4473

Closed bKP451 closed 6 months ago

bKP451 commented 6 months ago

Checks

Bug description

I am trying to setup the odin project locally. When I try to migrate, I get PG::UndefinedTable: ERROR: relation "lessons" does not exist /home/pandeybikashcom/Pictures/theodinproject/db/migrate/20210622162155_add_course_id_to_lessons.rb:3:in `change'

Caused by: ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "lessons" does not exist (ActiveRecord::StatementInvalid) /home/pandeybikashcom/Pictures/theodinproject/db/migrate/20210622162155_add_course_id_to_lessons.rb:3:in `change'

Caused by: PG::UndefinedTable: ERROR: relation "lessons" does not exist (PG::UndefinedTable)

How to reproduce

sdf

Expected behavior

The migration should happen successfully.

What browsers are you seeing the problem on?

Chrome

What OS are you using?

Ubuntu

Discord Name

No response

Additional Comments

No response

KevinMulhern commented 6 months ago

Hey @bKP451, try running $ rails db:schema:load instead of $ db:migrate

bKP451 commented 6 months ago

Hello there, @KevinMulhern Thanks.

bKP451 commented 6 months ago

Good.