Environment-aware scripts are
sql files that targets specific environment. For example,you may want to create big tables in Production with dedicated SQL Server file group, apply partition functions and partition schemes, and customize index fill factor but you don’t need this in Development and Test environments. Another example is applying permissions by script that’s different in Non-Production and Production environments.
Organize your repository
Any directory inside yuniql standard directories (
_erase) that starts with underscore (
_) represents an environment. To organize your repository, you may create
_prod inside those directories or in any sub-directories.
Example #1: Organizes script by directory
v1.00 + _development - setup_tables.sql + _test - setup_tables.sql + _staging - setup_tables.sql + _production - setup_tables.sql
Example #1: Organizes script in sub-directory
v1.00 + setup-tables + _development - setup_tables.sql + _test - setup_tables.sql + _staging - setup_tables.sql + _production - setup_tables.sql
Repositories organized with environment-aware scripts requires that environment code is pass during migration. Yuniql will throw exception and fail the migration when no environment code passed into CLI or API.
yuniql run -a --environment DEVELOPMENT yuniql run -a --environment TEST yuniql run -a --environment STAGING yuniql run -a --environment PRODUCTION
- Migrate via ASP.NET Core
- Migrate via Azure DevOps
- Migrate via Docker Container
- Migrate via Console Application
- Use Token Replacement
Help us improve further please create an issue.