GithubHelp home page GithubHelp logo

avanade / dbex Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 1.0 442 KB

DbEx provides database extensions for DbUp-inspired database migrations.

License: MIT License

C# 91.55% TSQL 1.27% PowerShell 1.09% Harbour 0.19% Handlebars 5.85% PLpgSQL 0.05%
dbup ado-net database sql sql-server

dbex's People

Contributors

chullybun avatar karpikpl avatar sealjay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

karpikpl

dbex's Issues

Add "quick start" to documentation

The current Readme is very detailed, but misses "quick start" section.
How to start?
Add nuget dependency? Clone the repositry?
How to script an existing DB with dotnet run scriptnew ?

Data import order should be reversed

Data imported from Assemblies needs to be reversed as described by the console output. Attempts to add, for example master data before corresponding reference data has been added.

Support for smalldatetime

When using nTangle I'm getting the following error when trying to generate code for a table that contains "smalldatatime". Please add support for it.

System.InvalidOperationException: 'Database data type 'smalldatetime' does not have corresponding .NET type mapping defined.'

Security Policy violation Outside Collaborators

This issue was automatically created by Allstar.

Security Policy Violation
Found 1 outside collaborators with admin access.
This policy requires users with this access to be members of the organisation. That way you can easily audit who has access to your repo, and if an account is compromised it can quickly be denied access to organization resources. To fix this you should either remove the user from repository-based access, or add them to the organization.

OR

If you don't see the Settings tab you probably don't have administrative access. Reach out to the administrators of the organisation to fix this issue.

OR

  • Exempt the user by adding an exemption to your organization-level Outside Collaborators configuration file.

This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Invalid comment or missing functionality?

Logger.LogInformation($" Probing for embedded resources: {string.Join(", ", GetNamespacesWithSuffix($"{DataNamespace}.*.sql", true))}");
var list = new List<(Assembly Assembly, string ResourceName)>();
foreach (var ass in Assemblies)
{
foreach (var rn in ass.GetManifestResourceNames())
{
// Filter on schema namespace prefix and suffix of '.sql'.
if (!Namespaces.Any(x => rn.StartsWith($"{x}.{DataNamespace}.", StringComparison.InvariantCulture) && (rn.EndsWith(".yaml", StringComparison.InvariantCultureIgnoreCase) || rn.EndsWith(".yml", StringComparison.InvariantCultureIgnoreCase))))
continue;
list.Add((ass, rn));
}
}

Line 366 mentions .sql files but 379 looks for .yml and .yaml

Add "quite" mode to DbEx

When DBEx is executed it outputs a full connection string with the password to standard output with many lines of logs.

The ability to limit logs to errors only or to disable them all together would be nice.

Feature: Read migrations from file system?

Hey @chullybun
in readme there's a section for schema:

The schema scripts must be marked as embedded resources, and reside under the Schema folder within the c# project. Each script should only contain a single Create statement. Each script will be parsed to determine type so that the appropriate order can be applied.

The Schema folder is used to encourage the usage of database schemas. Therefore, directly under should be the schema name, for example dbo or Ref. Then sub-folders for the object types as per Azure Data Studio, for example Functions, Stored Procedures or Types\User-Defined Table Types.

but in code the schema scripts are also read directly from file system

var di = new DirectoryInfo(Path.Combine(OutputDirectory.FullName, SchemaNamespace));
Logger.LogInformation($" Probing for files (recursively): {Path.Combine(di.FullName, "*", "*.sql")}");
if (di.Exists)
{
foreach (var fi in di.GetFiles("*.sql", SearchOption.AllDirectories))
{
var rn = $"{fi.FullName[(OutputDirectory.Parent.FullName.Length + 1)..]}".Replace(' ', '_').Replace('-', '_').Replace('\\', '.').Replace('/', '.');
scripts.Add(new DatabaseMigrationScript(fi, rn));
}
}

Additionally the recommendation is to create a directory structure under Schema folder, but DbEx.Test.Console doesn't follow that:

<EmbeddedResource Include="Schema\spGetContact.sql" />

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.