diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-07-05 17:51:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-05 17:51:23 -0500 |
| commit | 8551ea1930b6639007d18fdca35bfb4073b16914 (patch) | |
| tree | 2430f701f8359e602f4c16847331c588cb473cca /src/slskd/Core/Data/IMigration.cs | |
| parent | 8ab0cda52fda8b7e4f0353065c6f0dc5caeeb1f1 (diff) | |
| parent | 4914c3832358218d28f977baed2ddfb1e7e92723 (diff) | |
| download | slskd-8551ea1930b6639007d18fdca35bfb4073b16914.tar.gz | |
Merge branch 'master' into dependabot/npm_and_yarn/src/web/http-proxy-middleware-2.0.9
Diffstat (limited to 'src/slskd/Core/Data/IMigration.cs')
| -rw-r--r-- | src/slskd/Core/Data/IMigration.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/slskd/Core/Data/IMigration.cs b/src/slskd/Core/Data/IMigration.cs new file mode 100644 index 00000000..18b198b2 --- /dev/null +++ b/src/slskd/Core/Data/IMigration.cs @@ -0,0 +1,38 @@ +// <copyright file="IMigration.cs" company="slskd Team"> +// Copyright (c) slskd Team. All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see https://www.gnu.org/licenses/. +// </copyright> + +namespace slskd; + +/// <summary> +/// Applies database migrations. +/// </summary> +public interface IMigration +{ + /// <summary> + /// Determines whether the migration needs to be applied. + /// </summary> + /// <remarks> + /// This method MUST be read-only and should contain no side effects. + /// </remarks> + /// <returns>A value indicating whether the migration needs to be applied.</returns> + bool NeedsToBeApplied(); + + /// <summary> + /// Applies the migration. + /// </summary> + void Apply(); +}
\ No newline at end of file |
