Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

GetSchemaCreationScript() should include schema (namespace) creation  #406

Description

@rofr

MsSql and Postgres have the concept of schemas. Schemas are isolated namespaces within a database. SqlLite and MySql have no such concept. (MySql does have a SCHEMA keyword but it is a synonym for DATABASE.)

SqlStreamStore supports schemas for both mssql and postgres by way of the properties MsSqlStreamStoreSettings.Schema, MsSqlStreamStoreV3Settings.Schema and PostgresStreamStoreSettings.Schema.

The schema is created automatically when calling CreateSchemaIfNotExists() but not included in the script returned by GetSchemaCreationScript() This means the schema must be created separately before executing the generated script or it will fail.

I suggest the schema creation logic be included in the generated script so it will have the same behavior as calling CreateSchemaIfNotExists() This should apply to mssql and postgres as it is not applicable to the other providers.

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