{"id":23646943,"url":"https://github.com/exitare/entityframeworkcore.mysqlupdater","last_synced_at":"2026-05-18T02:36:22.391Z","repository":{"id":80040792,"uuid":"242197089","full_name":"Exitare/EntityFrameworkCore.MySqlUpdater","owner":"Exitare","description":"An entity core framework extension package, to auto apply sql files.","archived":false,"fork":false,"pushed_at":"2021-03-22T05:11:38.000Z","size":664,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-26T09:11:25.986Z","etag":null,"topics":["efcore","efcore-dotnetcore","extension","mysql","mysql-database","updater"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Exitare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-21T17:42:26.000Z","updated_at":"2022-07-07T19:29:36.000Z","dependencies_parsed_at":"2023-05-13T00:15:37.364Z","dependency_job_id":null,"html_url":"https://github.com/Exitare/EntityFrameworkCore.MySqlUpdater","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Exitare/EntityFrameworkCore.MySqlUpdater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exitare%2FEntityFrameworkCore.MySqlUpdater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exitare%2FEntityFrameworkCore.MySqlUpdater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exitare%2FEntityFrameworkCore.MySqlUpdater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exitare%2FEntityFrameworkCore.MySqlUpdater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Exitare","download_url":"https://codeload.github.com/Exitare/EntityFrameworkCore.MySqlUpdater/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exitare%2FEntityFrameworkCore.MySqlUpdater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33162688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["efcore","efcore-dotnetcore","extension","mysql","mysql-database","updater"],"created_at":"2024-12-28T13:48:09.280Z","updated_at":"2026-05-18T02:36:22.364Z","avatar_url":"https://github.com/Exitare.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EntityFrameworkCore.MySqlUpdater\nAn entity core framework extension package, to auto apply sql files.\n\n\n# Installation\n\nUse one of these possibilities to add the package to your project.  \n\n```Install-Package EntityFrameworkCore.MySqlUpdater```\n\n```dotnet add package EntityFrameworkCore.MySqlUpdater```\n\n```\u003cPackageReference Include=\"EntityFrameworkCore.MySqlUpdater\"\" /\u003e```\n\n```paket add EntityFrameworkCore.MySqlUpdater```\n\n\n# Idea\nThe idea behind this package is to extend EFCore with an auto updater for mysql databases. It is tedious to apply single sql files one by one, and even if you put them together in one big file you most likely can execute them more than once, because of update queries which will fail. \nThis package introduces convenience functions to apply sql files, keep track of already applied files and executing single sql files.\nThis package is not meant to be used for executing sql files that are not in your direct control. So never use it with queries that are vulnerable to sql injection attacks etc.\n\n\n\n\n# Usage\n\nThe package is using a database table called updates, to store hashsums of applied files to your database.\nThe updates folder contains information about the date and speed of execution, as well as the filename and the SHA hash.  \nWe will refer to the system as HashSumTracker.  \nThis HashSumTracker is used to prevent multiple executions of already applied sql files. This will cause issue if your sql files, contain update statements.\n\n-----\n\n## Example\nOne intended example workflow can be described as the following.\nA server is setup and at startup one can call the ApplyBaseFile function. This function will check if the schema is already populated. If it is populated it will return without executing the sql file. If the schema is empty ( table count == 0), the sql will be apllied. \nAfter the sql base file is applied, one can call ApplyUpdates(List of update folders). The package will iterate through all folders, trying to execute every sql file to your db. It is trying, because if you did not disable hashSumTracking, the tool is checking if the file is not already applied to your database. If the sql file is already applied, it will skip it and continue with the next one.\n\n\n## Available adjustable parameters:\n\n- Timeout: Specifies the mysql command timeout. Default = 60 seconds\n- DebugOutput: Activate/Deactivate the debugoutput. Default = false\n- Hashsumtracking: Activate/Deactivate the hashsum tracking. Default = true \n\n## Examples\n\nCreate the update table  \n```\nawait _context.CreateUpdatesTable().ConfigureAwait(false);\n```\n\n\nApply all sql files from given folders.\n```\nList\u003cstring\u003e folders = new List\u003cstring\u003e { \"PATH_TO_YOUR_FOLDER\", \"PATH_TO_ANOTHER_FOLDER\" };\nawait _context.ApplyUpdates(folders, true).ConfigureAwait(false);\n```  \n\n\nApply a single file\n```\nawait _context.ApplySQLFile(\"PATH_TO_YOUR_FILE\");\n```\n\n\nApply a base file\n\n```\n_context.ApplyBaseFile(\"YOUR_SCHAME_NAME\",\"PATH_TO_YOUR_BASE_FILE\");\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexitare%2Fentityframeworkcore.mysqlupdater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexitare%2Fentityframeworkcore.mysqlupdater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexitare%2Fentityframeworkcore.mysqlupdater/lists"}