Merge pull request #3 from teste-de-progresso/revert-2-fix/review-request-constraint
Revert "fix review request constraint"
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
4
db/schema.rb
generated
4
db/schema.rb
generated
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user