rdagumampan / yuniql

Free and open source schema versioning and database migration made natively with .NET/6. NEW THIS MAY 2022! v1.3.15 released!
https://yuniql.io
Apache License 2.0
419 stars 64 forks source link

Scripts _draft directory was skipped when db runs latest version #66

Closed rdagumampan closed 4 years ago

rdagumampan commented 4 years ago

Scripts _draft directory was skipped when db runs latest version

How to reproduce:

  1. yuniql init
  2. Add scripts to v0.00
  3. yuniql run
  4. Add scripts to v0.01
  5. yuniql run

Expected results:

Actual results:

rdagumampan commented 4 years ago

Fixed available in next release. https://github.com/rdagumampan/yuniql/commit/b3530314c4ac7530ac3a841efabdd08f590ae424

To support _draft, developer/data engineers need to handle repeated execution of scripts placed in _draft directory. For example, dropping the procedure before creating them.

DROP PROCEDURE IF EXISTS dbo.usp_get_employees;
GO

CREATE PROCEDURE dbo.usp_get_employees
AS
     SELECT * FROM dbo.employees;
GO