Skip to content

Appending .db to the file name #1

@martin-ecatch

Description

@martin-ecatch

Hi @BingCoke,
great work on this adapter! I was going to test it and encountered this unexpected behaviour:
The sqlite database name is forced to end with ".db". I have some existing databases from the original plugin and they all have ".sqlite" extension. Looking at the source code, it seems like op-sqlite does that. My app runs mainly offline so needs to handle upgrades seamlessly.
Do you feel strongly about forcing .db extension? I suggest removing this line and just passing options.name to op-sqlite:

const dbName = options.name.endsWith('.db') ? options.name : `${options.name}.db`;

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions