Esempio n. 1
0
 /// <summary>
 /// Flyway runner settings
 /// </summary>
 /// <param name="command"></param>
 /// <param name="configuration"></param>
 internal FlywaySettingsBase(string command, FlywayConfiguration configuration)
 {
     if (string.IsNullOrWhiteSpace(command))
     {
         throw new ArgumentNullException(nameof(command));
     }
     Command       = command;
     Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
 }
Esempio n. 2
0
 /// <summary>
 /// Flyway validate settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayValidateSettings(FlywayConfiguration configuration)
     : base("validate", configuration)
 {
 }
Esempio n. 3
0
 /// <summary>
 /// Flyway settings ctor for derived classes
 /// </summary>
 /// <param name="command"></param>
 /// <param name="configuration"></param>
 protected FlywayValidateSettings(string command, FlywayConfiguration configuration)
     : base(command, configuration)
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Flyway repair settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayRepairSettings(FlywayConfiguration configuration)
     : base("repair", configuration)
 {
 }
Esempio n. 5
0
 /// <summary>
 /// Flyway settings ctor for derived classes
 /// </summary>
 /// <param name="command"></param>
 /// <param name="configuration"></param>
 protected FlywayRepairSettings(string command, FlywayConfiguration configuration)
     : base(command, configuration)
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Flyway clean settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayCleanSettings(FlywayConfiguration configuration)
     : base("clean", configuration)
 {
 }
Esempio n. 7
0
 /// <summary>
 /// Flyway info settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayInfoSettings(FlywayConfiguration configuration)
     : base("info", configuration)
 {
 }
Esempio n. 8
0
 /// <summary>
 /// Flyway migrate settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayMigrateSettings(FlywayConfiguration configuration)
     : base("migrate", configuration)
 {
 }
Esempio n. 9
0
 /// <summary>
 /// Flyway baseline settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayBaselineSettings(FlywayConfiguration configuration)
     : base("baseline", configuration)
 {
 }
Esempio n. 10
0
        /// <summary>
        /// Execute 'flyway clean' with options
        /// </summary>
        /// <param name="configuration"></param>
        /// <example>
        /// <para>Run 'flyway clean'</para>
        /// <code>
        /// <![CDATA[
        /// Task("Flyway-Clean)
        ///     .Does(() =>
        ///     {
        ///         Flyway.Clean();
        ///     });
        /// ]]>
        /// </code>
        /// </example>
        public IFlywayRunnerCommands Clean(FlywayConfiguration configuration = null)
        {
            var settings = new FlywayCleanSettings(configuration);

            return(Run(settings));
        }
Esempio n. 11
0
        /// <summary>
        /// Execute 'flyway baseline' with options
        /// </summary>
        /// <param name="configuration"></param>
        /// <example>
        /// <para>Run 'flyway baseline'</para>
        /// <code>
        /// <![CDATA[
        /// Task("Flyway-Info)
        ///     .Does(() =>
        ///     {
        ///         Flyway.Migrate();
        ///     });
        /// ]]>
        /// </code>
        /// <para>Run 'flyway baseline'</para>
        /// <code>
        /// <![CDATA[
        /// Task("Flyway-Info)
        ///     .Does(() =>
        ///     {
        ///         Flyway.Migrate(new FlywayConfiguration
        ///             {
        ///                 BaselineVersion = "1.0.0.0"
        ///             }
        ///         );
        ///     });
        /// ]]>
        /// </code>
        /// </example>
        public IFlywayRunnerCommands Baseline(FlywayConfiguration configuration = null)
        {
            var settings = new FlywayBaselineSettings(configuration);

            return(Run(settings));
        }
Esempio n. 12
0
        /// <summary>
        /// Execute 'flyway validate' with options
        /// </summary>
        /// <param name="configuration"></param>
        /// <example>
        /// <para>Run 'flyway validate'</para>
        /// <code>
        /// <![CDATA[
        /// Task("Flyway-Validate)
        ///     .Does(() =>
        ///     {
        ///         Flyway.Validate();
        ///     });
        /// ]]>
        /// </code>
        /// <para>Run 'flyway validate'</para>
        /// <code>
        /// <![CDATA[
        /// Task("Flyway-Validate)
        ///     .Does(() =>
        ///     {
        ///         Flyway.Validate(new FlywayConfiguration
        ///             {
        ///                 OutOfOrder = true
        ///             }
        ///         );
        ///     });
        /// ]]>
        /// </code>
        /// </example>
        public IFlywayRunnerCommands Validate(FlywayConfiguration configuration = null)
        {
            var settings = new FlywayValidateSettings(configuration);

            return(Run(settings));
        }