diff --git a/README.md b/README.md index e1fcca0..a5bb25e 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,16 @@ # Requisitos - - Docker (Gerenciador de container) [Instalando Docker no Windows](https://docs.docker.com/desktop/install/windows-install/) # Setup - - Execute `./scripts/setup` para gerar a base do container, esse processo pode demorar um pouco pois será baixada todas as depêndencias do projeto, libs e banco de dados. # Levantar a aplicação - - Execute `docker-compose up` # Executar comandos no container - - Execute `./scripts/bash` para executar comandos você precisa entrar no console do container, agora você poderar por exemplo rodar as migrações de dados. -- Execute `rails db:migrate` para rodar as migrações no banco de dados. +- Execute `rails db:migration` para rodar as migrações no banco de dados. - Execute `bundle exec rake environment "user:create_admin[sem.email@example.com, Seu nome]"` para criar seu usuário -- Execute `rails db:seed` para popular o banco com os assuntos, exios e categorias +- Execute `rails db:seed` para popular o banco com os assuntos, exios e categorias \ No newline at end of file diff --git a/app/models/review_request.rb b/app/models/review_request.rb index 05bdf72..c5154f5 100644 --- a/app/models/review_request.rb +++ b/app/models/review_request.rb @@ -3,7 +3,7 @@ # Table name: review_requests # # id :bigint not null, primary key -# answered :string not null +# answered :string # created_at :datetime not null # updated_at :datetime not null # question_id :bigint not null diff --git a/db/migrate/20230504002009_change_review_request_answered_to_not_nil.rb b/db/migrate/20230504002009_change_review_request_answered_to_not_nil.rb deleted file mode 100644 index cb871fc..0000000 --- a/db/migrate/20230504002009_change_review_request_answered_to_not_nil.rb +++ /dev/null @@ -1,7 +0,0 @@ -class ChangeReviewRequestAnsweredToNotNil < ActiveRecord::Migration[7.0] - def change - ReviewRequest.where(answered: nil).update_all(answered: false) - - change_column_null :review_requests, :answered, false - end -end diff --git a/db/schema.rb b/db/schema.rb index b36bf57..fd29e44 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_05_04_002009) do +ActiveRecord::Schema[7.0].define(version: 2022_08_05_233401) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -110,7 +110,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_05_04_002009) do end create_table "review_requests", force: :cascade do |t| - t.string "answered", null: false + t.string "answered" t.bigint "question_id", null: false t.bigint "user_id", null: false t.datetime "created_at", null: false diff --git a/spec/factories/review_requests.rb b/spec/factories/review_requests.rb index a50e9d9..c79c077 100644 --- a/spec/factories/review_requests.rb +++ b/spec/factories/review_requests.rb @@ -3,7 +3,7 @@ # Table name: review_requests # # id :bigint not null, primary key -# answered :string not null +# answered :string # created_at :datetime not null # updated_at :datetime not null # question_id :bigint not null diff --git a/spec/models/review_request_spec.rb b/spec/models/review_request_spec.rb index 0c75cd3..7cd001b 100644 --- a/spec/models/review_request_spec.rb +++ b/spec/models/review_request_spec.rb @@ -3,7 +3,7 @@ # Table name: review_requests # # id :bigint not null, primary key -# answered :string not null +# answered :string # created_at :datetime not null # updated_at :datetime not null # question_id :bigint not null