Skip to content

[BUG]: migration always tries to create DB #5481

@jerbob92

Description

@jerbob92

Describe the bug
When running the migrations it will always try to create the DB first, even if it already exists, which fails when the Lago DB user does not have access to create DB's.

To Reproduce
Try to run ./scripts/migrate.sh with a DB user that does not have admin rights.

This is probably because it always executes bundle exec rake db:create before running bundle exec rails db:migrate.

Expected behavior
It should not fail on DB creation, when the DB creation already exists.

Screenshots

Additional context

Version

  • Lago: v1.45.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 BugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions