Skip to content

cargo sqlx prepare with MSSQL #1005

Open

Description

@euphbriggs

Hello,

I'm new to Rust, so if I'm missing relevant context, please don't hesitate to let me know what I can provide.

I'm attempting to use the sqlx-cli crate to enable offline compiling. I installed it with: cargo install sqlx-cli When I run cargo sqlx prepare I get the following output:

error: error with configuration: database URL has the scheme of a MSSQL database but the `mssql` feature is not enabled

rustup show output:

Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\Ben\.rustup

installed toolchains
--------------------

stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc (default)

active toolchain
----------------

nightly-x86_64-pc-windows-msvc (default)
rustc 1.51.0-nightly (a4cbb44ae 2021-01-20)

Does sqlx-cli work on Windows with a MSSQL database?

Thanks in advance!

Activity

  1. euphbriggs commented on Jan 21, 2021

    @euphbriggs
    Author

    I suppose it might be helpful to post my Cargo.toml file:

    [dependencies]
    chrono = "0.4"
    env_logger = "0.8"
    log = "*"
    reqwest = { version = "0.10", features = ["json"] }
    serde = { version = "1.0", features = ["derive"] }
    serde_json = "1.0"
    sqlx = { version = "0.4.2", features = ["runtime-tokio-rustls", "macros", "mssql"] }
    tokio = { version = "0.2", features = ["full"] }
  2. abonander commented on Jan 22, 2021

    @abonander
    Collaborator

    sqlx-cli doesn't have an mssql feature yet. It looks like it still needs support added for migrations.

  3. euphbriggs commented on Jan 22, 2021

    @euphbriggs
    Author

    Thanks @abonander for the quick reply. Are there any current plans for adding migrations support to complete to necessary features?

  4. barskern commented on Jan 19, 2022

    @barskern
    Contributor

    Thanks @abonander for the quick reply. Are there any current plans for adding migrations support to complete to necessary features?

    Came across this while facing an error with MSSQL and migrations. Can't seem to find a better issue, so I will ask here first and potentially make a new issue if needed. Any plans on migrations on MSSQL? I could take a jab at implementing it if all that is needed is someone willing to do the work.

  5. abonander commented on Jan 19, 2022

    @abonander
    Collaborator

    Yeah, for the most part someone just needs to write the code, although we have updated plans for the MSSQL driver you may want to read up on first: #1616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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