How to write a custom Database Provider
masterTo support a new database engine, you must implement IDatabaseProvider<TConnection>. The implementation strategy depends on whether you want to support concurrent migrators:
1. No Concurrency Support
Subclass DatabaseProviderBaseWithAdvisoryLock. Override AcquireAdvisoryLock() and ReleaseAdvisoryLock() to do nothing. Implement the SQL methods: GetcreateVersionTableSql(), GetCurrentVersionSql(), and GetSetVersionSql().
2. Concurrency via Advisory Locks
Subclass DatabaseProviderBaseWithAdvisoryLock. Implement AcquireAdvisoryLock() and ReleaseAdvisoryLock() using your database's specific advisory lock mechanism. Implement the SQL methods: GetcreateVersionTableSql(), GetCurrentVersionSql(), and GetSetVersionSql().
3. Concurrency via Version Table Locking
Subclass DatabaseProviderBaseWithVersionTableLock. Implement AcquireVersionTableLock() by creating a transaction on this.VersionTableConnection and executing SQL to lock the table. Implement ReleaseVersionTableLock() by destroying the transaction. Implement the SQL methods: GetcreateVersionTableSql(), GetCurrentVersionSql(), and GetSetVersionSql().