Skip to content

error: schema "public" already exists #310

@madisonrickert

Description

@madisonrickert

I get this error every time I run the automigrate method with more than one table (or multiple times against the same DB). The error message is filling up my log files.

I skimmed the source and it looks like IF NOT EXISTS was intentionally omitted from the CREATE SCHEMA query to support PostgreSQL <9.3. PostgreSQL 9.2 is now officially EOL as of September. So I would propose dropping support for 9.2 and adding the IF NOT EXISTS.

If that's still not an option, the version number could be detected and stored upon initialization to allow the support of more modern PostgreSQL features (could help with #301).

This would also allow merging in #28.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions