Skip to content

Bug: role creation makes dev database error out #3692

@JasperSurmont

Description

@JasperSurmont

Atlas generated a migration based on my .hcl file, creating:

CREATE ROLE rolename

The problem is, and I believe this is a bug, that when using a non-Docker dev database, every migrate comand fails because role already exists.

I know it's an easy fix to instead change the SQL migration to only create the role if it doesn't exist, but this was automatically created a while back. The only way to fix this issue (as I cannot simply make another migration 'fixing' this), was to go back in the migrations that were already applied on Production, adding the check if the role already exists.

I believe this is not the proposed way to do this.

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