Merge branch 'feature/migrations-fix' of github.com:ONLYOFFICE/AppServer into feature/migrations-fix
# Conflicts: # common/Tools/AutoMigrationCreator/AutoMigrationCreator.csproj # common/Tools/AutoMigrationCreator/Program.cs # common/Tools/AutoMigrationCreator/Utils/Options.cs
This commit is contained in:
commit
aa162790a7
@ -46,8 +46,8 @@ global using System.Xml.Linq;
|
||||
global using ASC.Common;
|
||||
global using ASC.Common.Utils;
|
||||
global using ASC.Core.Common.EF;
|
||||
global using ASC.Core.Common.EF.Context;
|
||||
global using ASC.Core.Common.EF.Model.Resource;
|
||||
global using ASC.Resource.Manager.EF.Context;
|
||||
global using ASC.Resource.Manager.EF.Model;
|
||||
|
||||
global using Autofac;
|
||||
|
||||
|
@ -24,32 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System Limited 2010-2018
|
||||
*
|
||||
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
|
||||
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
|
||||
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
|
||||
*
|
||||
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
|
||||
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
|
||||
* relevant author attributions when distributing the software. If the display of the logo in its graphic
|
||||
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
|
||||
* in every copy of the program you distribute.
|
||||
* Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
namespace ASC.Resource.Manager;
|
||||
|
||||
public static class JsonManager
|
||||
|
@ -24,31 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System Limited 2010-2018
|
||||
*
|
||||
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
|
||||
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
|
||||
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
|
||||
*
|
||||
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
|
||||
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
|
||||
* relevant author attributions when distributing the software. If the display of the logo in its graphic
|
||||
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
|
||||
* in every copy of the program you distribute.
|
||||
* Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace ASC.Resource.Manager;
|
||||
|
||||
[Scope]
|
||||
@ -56,11 +31,7 @@ public class ResourceData
|
||||
{
|
||||
private const string Dbid = "tmresource";
|
||||
|
||||
using ASC.Common;
|
||||
using ASC.Core.Common.EF;
|
||||
using ASC.Resource.Manager.EF.Context;
|
||||
using ASC.Resource.Manager.EF.Model;
|
||||
|
||||
private ResourceDbContext DbContext { get; }
|
||||
public ResourceData(DbContextManager<ResourceDbContext> dbContext)
|
||||
{
|
||||
DbContext = dbContext.Get(Dbid);
|
||||
|
@ -1,9 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<StartupObject>AutoMigrationCreator.Program</StartupObject>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@ -11,9 +13,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\products\ASC.Files\Core\ASC.Files.Core.csproj" />
|
||||
<ProjectReference Include="..\..\ASC.Core.Common\ASC.Core.Common.csproj" />
|
||||
<ProjectReference Include="..\..\ASC.Data.Backup.Core\ASC.Data.Backup.Core.csproj" />
|
||||
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||
<PackageReference Include="Microsoft.Build" Version="17.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
|
||||
@ -22,4 +21,8 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\ASC.Core.Common\ASC.Core.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
31
common/Tools/AutoMigrationCreator/AutoMigrationCreator.sln
Normal file
31
common/Tools/AutoMigrationCreator/AutoMigrationCreator.sln
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.2.32616.157
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoMigrationCreator", "AutoMigrationCreator.csproj", "{C80E803C-96DE-44FB-B9D8-8C75219FD8C3}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Core.Common", "..\..\ASC.Core.Common\ASC.Core.Common.csproj", "{A51D0454-4AFA-46DE-89D4-B03D37E1816C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C80E803C-96DE-44FB-B9D8-8C75219FD8C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C80E803C-96DE-44FB-B9D8-8C75219FD8C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C80E803C-96DE-44FB-B9D8-8C75219FD8C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C80E803C-96DE-44FB-B9D8-8C75219FD8C3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {F78EB357-DACF-4759-83BB-C9767C317894}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -24,11 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
using AutoMigrationCreator.Core;
|
||||
|
||||
namespace AutoMigrationCreator;
|
||||
|
||||
public class AssemblyContextFinder : ContextFinder
|
||||
|
@ -24,12 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using ASC.Core.Common.EF;
|
||||
|
||||
namespace AutoMigrationCreator.Core;
|
||||
public abstract class ContextFinder
|
||||
{
|
||||
|
@ -24,13 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
using AutoMigrationCreator.Core;
|
||||
|
||||
namespace AutoMigrationCreator;
|
||||
|
||||
public static class MigrationCreator
|
||||
|
@ -24,18 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using ASC.Core.Common.EF;
|
||||
|
||||
using AutoMigrationCreator.Core;
|
||||
|
||||
using Microsoft.EntityFrameworkCore.Migrations.Design;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace AutoMigrationCreator;
|
||||
|
||||
public class MigrationGenerator
|
||||
|
@ -24,15 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
using ASC.Core.Common.EF;
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Migrations.Design;
|
||||
using Microsoft.EntityFrameworkCore.Migrations.Operations;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace AutoMigrationCreator;
|
||||
|
||||
public class ModelDifferenceChecker
|
||||
|
@ -24,11 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
using AutoMigrationCreator.Core;
|
||||
|
||||
namespace AutoMigrationCreator;
|
||||
|
||||
public class ProjectInfoContextFinder : ContextFinder
|
||||
|
@ -24,13 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
using Microsoft.Build.Construction;
|
||||
|
||||
namespace AutoMigrationCreator.Core;
|
||||
|
||||
public static class Solution
|
||||
|
44
common/Tools/AutoMigrationCreator/GlobalUsings.cs
Normal file
44
common/Tools/AutoMigrationCreator/GlobalUsings.cs
Normal file
@ -0,0 +1,44 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
global using System.Configuration;
|
||||
global using System.Reflection;
|
||||
global using System.Text.RegularExpressions;
|
||||
|
||||
global using ASC.Core.Common.EF;
|
||||
|
||||
global using Autofac;
|
||||
|
||||
global using AutoMigrationCreator.Core;
|
||||
|
||||
global using Microsoft.Build.Construction;
|
||||
global using Microsoft.EntityFrameworkCore;
|
||||
global using Microsoft.EntityFrameworkCore.Design;
|
||||
global using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
global using Microsoft.EntityFrameworkCore.Migrations.Design;
|
||||
global using Microsoft.EntityFrameworkCore.Migrations.Operations;
|
||||
global using Microsoft.EntityFrameworkCore.Storage;
|
||||
global using Microsoft.Extensions.DependencyInjection;
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"profiles": {
|
||||
"AutoMigrationCreator": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": false
|
||||
}
|
||||
}
|
||||
}
|
@ -24,11 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using System;
|
||||
using System.Configuration;
|
||||
|
||||
using ASC.Core.Common.EF;
|
||||
|
||||
namespace AutoMigrationCreator;
|
||||
|
||||
public class DbContextActivator
|
||||
|
@ -24,14 +24,6 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using ASC.Core.Common.EF;
|
||||
|
||||
using Microsoft.EntityFrameworkCore.Design;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations.Design;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace AutoMigrationCreator;
|
||||
|
||||
public static class EFCoreDesignTimeServices
|
||||
|
Loading…
Reference in New Issue
Block a user