123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?xml version="1.0" encoding="utf-8"?>
- <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <MigratorTasksPath>$(MSBuildProjectDirectory)\..\..\build</MigratorTasksPath>
- </PropertyGroup>
-
- <!-- Migration-related targets, properties, etc. -->
- <Import Project="$(MigratorTasksPath)\Migrator.Targets" />
- <Target Name="Migrate">
- <CreateProperty Value="-1" Condition="'$(SchemaVersion)'==''">
- <Output TaskParameter="Value" PropertyName="SchemaVersion"/>
- </CreateProperty>
- <Migrate Provider="MySql"
- Connectionstring="Data Source=localhost;Database=test;User Id=root;Password=;"
- Migrations="$(MSBuildProjectDirectory)\migrations\migrations.dll"
- To="$(SchemaVersion)"/>
- </Target>
- <Target Name="Migrate-DryRun">
- <CreateProperty Value="-1" Condition="'$(SchemaVersion)'==''">
- <Output TaskParameter="Value" PropertyName="SchemaVersion"/>
- </CreateProperty>
- <Migrate Provider="MySql"
- Connectionstring="Data Source=localhost;Database=test;User Id=root;Password=;"
- Migrations="$(MSBuildProjectDirectory)\migrations\migrations.dll"
- To="$(SchemaVersion)"
- DryRun="true"/>
- </Target>
- <Target Name="Migrate-Dump">
- <CreateProperty Value="-1" Condition="'$(SchemaVersion)'==''">
- <Output TaskParameter="Value" PropertyName="SchemaVersion"/>
- </CreateProperty>
- <Migrate Provider="MySql"
- Connectionstring="Data Source=localhost;Database=test;User Id=root;Password=;"
- Migrations="$(MSBuildProjectDirectory)\migrations\migrations.dll"
- To="$(SchemaVersion)"
- ScriptFile="MSBuild-migrations.sql"/>
- </Target>
- <Target Name="Migrate-DryRun2">
- <CreateProperty Value="-1" Condition="'$(SchemaVersion)'==''">
- <Output TaskParameter="Value" PropertyName="SchemaVersion"/>
- </CreateProperty>
- <Migrate Provider="MySql"
- Connectionstring="Data Source=localhost;Database=test;User Id=root;Password=;"
- Directory="$(MSBuildProjectDirectory)\migrations\"
- To="$(SchemaVersion)"
- DryRun="true"/>
- </Target>
- </Project>
|