Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add access token option to sqlpackage #2581

Conversation

yazeedobaid
Copy link
Collaborator

Description

This PR adds the access token to sqlpackage module. It will open the possibility to deploy a DacPac project using an access token instead of a username and password. Here is an example usage of it:

open Fake.Core
open Fake.Sql

/// the database for local development + compile
Target.create "DeployLocalDb" (fun _ ->
    let dacPacPath = "path/to/dbProject.dacpac"
    let accessToken = "your-access-token"
    let connectionString = "Data Source=your-server-name.database.windows.net; Initial Catalog=your-database-name;" 
    SqlPackage.deployDb (fun args -> 
        { args with 
                Destination = connectionString
                AccessToken = accessToken
                Source = dacPacPath 
        }) |> ignore
)

TODO

  • New (API-)documentation for new features exist (Note: API-docs are enough, additional docs are in help/markdown)
  • unit or integration test exists (or short reasoning why it doesn't make sense)
  • boy scout rule: "leave the code behind in a better state than you found it" (fix warnings, obsolete members or code-style in the places you worked in)
  • (if new module) the module has been linked from the "Modules" menu, edit help/templates/template.cshtml, linking to the API-reference is fine.
  • (if new module) the module is in the correct namespace
  • (if new module) the module is added to Fake.sln (dotnet sln Fake.sln add src/app/Fake.*/Fake.*.fsproj)
  • Fake 5 API guideline is honored

@matthid matthid merged commit a4b56fe into fsprojects:release/next Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add SqlPackage.exe /AccessToken parameter
2 participants