Skip to content

DB Migrations #17

@kevinrobayna

Description

@kevinrobayna

Hello, Thank you so much for getting this together! I was trying it out but the specs currently fails because he missing migrations.

  config.before(:suite) do
    container = Testcontainers::PostgresContainer.new("postgres:15")
    config.postgres_container = container.start
    ENV["DATABASE_URL"] = config.postgres_container.database_url

    # fails here
    ActiveRecord::Migration.maintain_test_schema! 
  end

  config.after(:suite) do
    config.postgres_container&.stop
    config.postgres_container&.remove
  end

Do you have any ideas of wether we can provide to the testcontainer a schema file to start with or something to avoid running db migrations in the specs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions