mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.52k stars 306 forks source link

Add default bookmarks or use project depending storage #772

Open NCC1701M opened 3 years ago

NCC1701M commented 3 years ago

I use a dev container and have the sqltools extension installed in the container. When I have to rebuild the container, all my bookmarks are gone.

Bookmarks should be persistent even the underlying environment has changed.

I would suggest to add the bookmarks to the .vscode/settings.json or at least to a special file within the .vscode folder.

The settings.json could be like:

{
    "sqltools.connections": [
        {
            "mssqlOptions": {
                "appName": "SQLTools",
                "useUTC": true,
                "encrypt": true
            },
            "previewLimit": 50,
            "server": "localhost",
            "port": 1433,
            "driver": "MSSQL",
            "name": "MyDBConnection",
            "database": "MyDb",
            "username": "sa",
            "password": "S0meFunnyP@ssword"
        }
    ],
    "sqltools.bookmarks": [
        {
            "name": "Drop Database",
            "group": "Management",
            "sql": [
                "USE master",
                "GO",
                "",
                "DROP DATABASE MyDb",
                "GO"
            ]
        }
    ]
}
niccolomineo commented 2 years ago

I am working in the same scenario as the OP, so please evaluate his suggestion ASAP.

Suniron commented 1 year ago

Is there a way to store bookmark and share it in a git project now?

gjsjohnmurray commented 10 months ago

Is there a way to store bookmark and share it in a git project now?

No, there has been no development in this area.