Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • Fix/xxxx-updateDependencies
  • Hotfix/0071-fixResourceCreate
  • Hotfix/1035-fixResourceApi
  • Hotfix/1360-databaseScaffolding
  • Hotfix/1383-topLevel
  • Hotfix/1383-topLevelAlternative
  • Hotfix/1433-defaultQuota
  • Hotfix/1796-projectDdos
  • Hotfix/2087-efNet6
  • Hotfix/64-releaseUDE
  • Hotfix/73-fixResourceCreateRDS
  • Issue/1321-pidEnquiryOverhaul
  • Issue/1788-extractionCronjob
  • Issue/1866-ExtendResourceTypeConfigurationTUDo
  • Issue/1867-addNewResourceTypes
  • Issue/1877-ExtendResourceTypeConfigurationNRWFHs
  • Issue/1878-addNewResourceTypes
  • Issue/1910-MigrationtoNET6.0
  • Issue/1913-ModificationsResourceMetadata
  • Issue/1951-quotaImplementation
  • Issue/1999-gitlabResourcesLib
  • Issue/2072-wormResourceType
  • Issue/2101-gitLabResTypeUi
  • Issue/2102-gitLabResTypeRCV
  • Issue/2183-kpiGeneratorResource
  • Issue/2221-projectDateCreated
  • Issue/2222-resourceDateCreated
  • Issue/2278-gitlabToS
  • Issue/2287-guestRole
  • Issue/2309-docs
  • Issue/2364-testingKpiParser
  • Issue/2449-GuidPidSlugToProjectSettings
  • Issue/3003-stsInstitute
  • Issues/0028-maxQuotaFix
  • Product/1100-fdsS3
  • Product/1149-dfnaai
  • Product/1154-resourceTypeDefinition
  • Product/1188-LoggingExtended
  • Product/1287-dotnet5Sharepoint
  • Product/1414-fhPrivileges
  • Product/1470-migrationForArchiving
  • Product/1573-ReadOnlyResources
  • Product/1629-onboardingOtherUniversities
  • Product/202-userInvitation
  • Product/407-net5migration
  • Product/704-basicReporting
  • Product/789-userContactEmail
  • Product/903-ApiTokens
  • Sprint/2020-20
  • Sprint/2020-22
  • Sprint/2021-01
  • Sprint/2021-03
  • Sprint/2021-04
  • Sprint/2021-05
  • Sprint/2021-08
  • Sprint/2021-10
  • Sprint/2021-11
  • Sprint/2021-15
  • Sprint/2021-19
  • Sprint/2022-01
  • Test/xxxx-pipelineTriggers
  • Topic/1051-basicReporting
  • Topic/1125-apiTokens
  • Topic/1159-rtdApi
  • Topic/1221-LogginExtendedNew
  • Topic/1221-LoggingExtended
  • Topic/1226-databaseLibraryMigration
  • Topic/1278-dfnAAI
  • Topic/1286-dotnet5Database
  • Topic/1292-FdsS3
  • Topic/1294-contactChangeFunctionality
  • Topic/1425-fhPrivileges
  • Topic/1453-userInvitation
  • Topic/1556-migrationForArchiving
  • Topic/1597-AddArchiveFlagInResourceObject
  • Topic/1711-extendResourceTypeConfiguration
  • Topic/1714-newResourceTypesUDE
  • dev
  • gitkeep
  • master
  • v1.0.0
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.12.0
  • v1.12.1
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.16.0
  • v1.17.0
  • v1.18.0
  • v1.19.0
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.20.0
  • v1.21.0
  • v1.22.0
  • v1.22.1
  • v1.22.2
  • v1.23.0
  • v1.24.0
  • v1.25.0
  • v1.25.1
  • v1.26.0
  • v1.27.0
  • v1.27.1
  • v1.28.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.7.0
  • v1.8.0
  • v1.9.0
  • v2.0.0
  • v2.0.1
  • v2.1.0
  • v2.1.1
  • v2.10.0
  • v2.10.1
  • v2.11.0
  • v2.11.1
  • v2.12.0
  • v2.12.1
  • v2.13.0
  • v2.14.0
  • v2.15.0
  • v2.16.0
  • v2.16.1
  • v2.16.2
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.19.1
  • v2.2.0
  • v2.2.1
  • v2.20.0
  • v2.22.0
  • v2.3.0
  • v2.4.0
  • v2.4.1
  • v2.5.0
  • v2.6.0
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.7.3
  • v2.8.0
  • v2.9.0
  • v2.9.1
154 results

Target

Select target project
  • coscine/backend/libraries/database
1 result
Select Git revision
  • Fix/xxxx-updateDependencies
  • Hotfix/0071-fixResourceCreate
  • Hotfix/1035-fixResourceApi
  • Hotfix/1360-databaseScaffolding
  • Hotfix/1383-topLevel
  • Hotfix/1383-topLevelAlternative
  • Hotfix/1433-defaultQuota
  • Hotfix/1796-projectDdos
  • Hotfix/2087-efNet6
  • Hotfix/64-releaseUDE
  • Hotfix/73-fixResourceCreateRDS
  • Issue/1321-pidEnquiryOverhaul
  • Issue/1788-extractionCronjob
  • Issue/1866-ExtendResourceTypeConfigurationTUDo
  • Issue/1867-addNewResourceTypes
  • Issue/1877-ExtendResourceTypeConfigurationNRWFHs
  • Issue/1878-addNewResourceTypes
  • Issue/1910-MigrationtoNET6.0
  • Issue/1913-ModificationsResourceMetadata
  • Issue/1951-quotaImplementation
  • Issue/1999-gitlabResourcesLib
  • Issue/2072-wormResourceType
  • Issue/2101-gitLabResTypeUi
  • Issue/2102-gitLabResTypeRCV
  • Issue/2183-kpiGeneratorResource
  • Issue/2221-projectDateCreated
  • Issue/2222-resourceDateCreated
  • Issue/2278-gitlabToS
  • Issue/2287-guestRole
  • Issue/2309-docs
  • Issue/2364-testingKpiParser
  • Issue/2449-GuidPidSlugToProjectSettings
  • Issue/3003-stsInstitute
  • Issues/0028-maxQuotaFix
  • Product/1100-fdsS3
  • Product/1149-dfnaai
  • Product/1154-resourceTypeDefinition
  • Product/1188-LoggingExtended
  • Product/1287-dotnet5Sharepoint
  • Product/1414-fhPrivileges
  • Product/1470-migrationForArchiving
  • Product/1573-ReadOnlyResources
  • Product/1629-onboardingOtherUniversities
  • Product/202-userInvitation
  • Product/407-net5migration
  • Product/704-basicReporting
  • Product/789-userContactEmail
  • Product/903-ApiTokens
  • Sprint/2020-20
  • Sprint/2020-22
  • Sprint/2021-01
  • Sprint/2021-03
  • Sprint/2021-04
  • Sprint/2021-05
  • Sprint/2021-08
  • Sprint/2021-10
  • Sprint/2021-11
  • Sprint/2021-15
  • Sprint/2021-19
  • Sprint/2022-01
  • Test/xxxx-pipelineTriggers
  • Topic/1051-basicReporting
  • Topic/1125-apiTokens
  • Topic/1159-rtdApi
  • Topic/1221-LogginExtendedNew
  • Topic/1221-LoggingExtended
  • Topic/1226-databaseLibraryMigration
  • Topic/1278-dfnAAI
  • Topic/1286-dotnet5Database
  • Topic/1292-FdsS3
  • Topic/1294-contactChangeFunctionality
  • Topic/1425-fhPrivileges
  • Topic/1453-userInvitation
  • Topic/1556-migrationForArchiving
  • Topic/1597-AddArchiveFlagInResourceObject
  • Topic/1711-extendResourceTypeConfiguration
  • Topic/1714-newResourceTypesUDE
  • dev
  • gitkeep
  • master
  • v1.0.0
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.12.0
  • v1.12.1
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.16.0
  • v1.17.0
  • v1.18.0
  • v1.19.0
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.20.0
  • v1.21.0
  • v1.22.0
  • v1.22.1
  • v1.22.2
  • v1.23.0
  • v1.24.0
  • v1.25.0
  • v1.25.1
  • v1.26.0
  • v1.27.0
  • v1.27.1
  • v1.28.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.7.0
  • v1.8.0
  • v1.9.0
  • v2.0.0
  • v2.0.1
  • v2.1.0
  • v2.1.1
  • v2.10.0
  • v2.10.1
  • v2.11.0
  • v2.11.1
  • v2.12.0
  • v2.12.1
  • v2.13.0
  • v2.14.0
  • v2.15.0
  • v2.16.0
  • v2.16.1
  • v2.16.2
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.19.1
  • v2.2.0
  • v2.2.1
  • v2.20.0
  • v2.22.0
  • v2.3.0
  • v2.4.0
  • v2.4.1
  • v2.5.0
  • v2.6.0
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.7.3
  • v2.8.0
  • v2.9.0
  • v2.9.1
154 results
Show changes
Commits on Source (3)
...@@ -9,8 +9,8 @@ using System.Reflection; ...@@ -9,8 +9,8 @@ using System.Reflection;
[assembly: AssemblyDescription("Database.Tests is a part of the CoScInE group.")] [assembly: AssemblyDescription("Database.Tests is a part of the CoScInE group.")]
[assembly: AssemblyCompany("IT Center, RWTH Aachen University")] [assembly: AssemblyCompany("IT Center, RWTH Aachen University")]
[assembly: AssemblyProduct("Database.Tests")] [assembly: AssemblyProduct("Database.Tests")]
[assembly: AssemblyVersion("1.7.0.0")] [assembly: AssemblyVersion("1.8.0.0")]
[assembly: AssemblyFileVersion("1.7.0.0")] [assembly: AssemblyFileVersion("1.8.0.0")]
[assembly: AssemblyInformationalVersion("1.7.0.0")] [assembly: AssemblyInformationalVersion("1.8.0.0")]
[assembly: AssemblyCopyright("2019 IT Center, RWTH Aachen University")] [assembly: AssemblyCopyright("2019 IT Center, RWTH Aachen University")]
...@@ -9,8 +9,8 @@ using System.Reflection; ...@@ -9,8 +9,8 @@ using System.Reflection;
[assembly: AssemblyDescription("Database is a part of the CoScInE group.")] [assembly: AssemblyDescription("Database is a part of the CoScInE group.")]
[assembly: AssemblyCompany("IT Center, RWTH Aachen University")] [assembly: AssemblyCompany("IT Center, RWTH Aachen University")]
[assembly: AssemblyProduct("Database")] [assembly: AssemblyProduct("Database")]
[assembly: AssemblyVersion("1.7.0.0")] [assembly: AssemblyVersion("1.8.0.0")]
[assembly: AssemblyFileVersion("1.7.0.0")] [assembly: AssemblyFileVersion("1.8.0.0")]
[assembly: AssemblyInformationalVersion("1.7.0.0")] [assembly: AssemblyInformationalVersion("1.8.0.0")]
[assembly: AssemblyCopyright("2019 IT Center, RWTH Aachen University")] [assembly: AssemblyCopyright("2019 IT Center, RWTH Aachen University")]
This diff is collapsed.
This diff is collapsed.
using FluentMigrator;
using System;
using System.IO;
using System.Reflection;
using System.Xml;
using System.Xml.Linq;
namespace Coscine.Database.Migration.Migrations
{
//yyyymmddhhmm
[Migration(201910161154)]
public class Migration201910161154InstitutesDisciplines : FluentMigrator.Migration
{
public override void Down()
{
HandleInstitute((obj) => Delete.FromTable("Institutes").Row(obj));
HandleDiscipline((obj) => Delete.FromTable("Disciplines").Row(obj));
}
public override void Up()
{
HandleInstitute((obj) => Insert.IntoTable("Institutes").Row(obj));
HandleDiscipline((obj) => Insert.IntoTable("Disciplines").Row(obj));
}
private void HandleInstitute(Action<object> action)
{
var assembly = Assembly.GetExecutingAssembly();
var resourceName = "Coscine.Database.Migration.Assets.Institutes.csv";
using (var stream = assembly.GetManifestResourceStream(resourceName))
using (var reader = new StreamReader(stream))
{
while (!reader.EndOfStream)
{
var line = reader.ReadLine();
if (line.Contains(","))
{
var values = line.Split(',');
if (values[0].Trim() != "" && values[1].Trim() != "")
{
action.Invoke(new { IKZ = values[0].Trim(), DisplayName = values[1].Trim() });
}
}
}
}
}
private void HandleDiscipline(Action<object> action)
{
var assembly = Assembly.GetExecutingAssembly();
var resourceName = "Coscine.Database.Migration.Assets.dfg_structure.rdf";
using (var stream = assembly.GetManifestResourceStream(resourceName))
using (XmlReader reader = XmlReader.Create(stream))
{
reader.MoveToContent();
XNamespace skosNameSpace = "http://www.w3.org/2004/02/skos/core#";
XNamespace rdfNameSpace = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element)
{
if (reader.Name == "skos:Concept")
{
XElement el = (XElement) XNode.ReadFrom(reader);
var notation = el.Element(skosNameSpace + "notation");
if (int.TryParse(notation.Value, out int val) && notation.Value.Length == 3)
{
var url = el.Attribute(rdfNameSpace + "about").Value;
action.Invoke(new { DisplayName = el.Element(skosNameSpace + "prefLabel").Value, Url = url });
}
}
}
}
}
}
}
}
...@@ -24,8 +24,6 @@ namespace Coscine.Database.Migration ...@@ -24,8 +24,6 @@ namespace Coscine.Database.Migration
private void SetServiceProvider(System.Reflection.Assembly targetAssembly, string dbConnectionString) private void SetServiceProvider(System.Reflection.Assembly targetAssembly, string dbConnectionString)
{ {
var serviceProvider = new ServiceCollection() var serviceProvider = new ServiceCollection()
// Logging is the replacement for the old IAnnouncer
.AddLogging(lb => lb.AddFluentMigratorConsole())
// Registration of all FluentMigrator-specific services // Registration of all FluentMigrator-specific services
.AddFluentMigratorCore() .AddFluentMigratorCore()
// Configure the runner // Configure the runner
......
...@@ -154,12 +154,15 @@ ...@@ -154,12 +154,15 @@
<Compile Include="Migrations\Migration201908071616RdsResource.cs" /> <Compile Include="Migrations\Migration201908071616RdsResource.cs" />
<Compile Include="Migrations\Migration201907100900UserProfilesApi.cs" /> <Compile Include="Migrations\Migration201907100900UserProfilesApi.cs" />
<Compile Include="Migrations\Migration201908231520ResourceDisplayName.cs" /> <Compile Include="Migrations\Migration201908231520ResourceDisplayName.cs" />
<Compile Include="Migrations\Migration201910161154InstitutesDisciplines.cs" />
<Compile Include="Migrator.cs" /> <Compile Include="Migrator.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />
<EmbeddedResource Include="Assets\dfg_structure.rdf" />
<EmbeddedResource Include="Assets\Institutes.csv" />
<None Include="LinqToDB.Templates\DataAnnotations.ttinclude" /> <None Include="LinqToDB.Templates\DataAnnotations.ttinclude" />
<None Include="LinqToDB.Templates\DataModel.ttinclude" /> <None Include="LinqToDB.Templates\DataModel.ttinclude" />
<None Include="LinqToDB.Templates\EditableObject.ttinclude" /> <None Include="LinqToDB.Templates\EditableObject.ttinclude" />
......
...@@ -9,8 +9,8 @@ using System.Reflection; ...@@ -9,8 +9,8 @@ using System.Reflection;
[assembly: AssemblyDescription("Migrator is a part of the CoScInE group.")] [assembly: AssemblyDescription("Migrator is a part of the CoScInE group.")]
[assembly: AssemblyCompany("IT Center, RWTH Aachen University")] [assembly: AssemblyCompany("IT Center, RWTH Aachen University")]
[assembly: AssemblyProduct("Migrator")] [assembly: AssemblyProduct("Migrator")]
[assembly: AssemblyVersion("1.7.0.0")] [assembly: AssemblyVersion("1.8.0.0")]
[assembly: AssemblyFileVersion("1.7.0.0")] [assembly: AssemblyFileVersion("1.8.0.0")]
[assembly: AssemblyInformationalVersion("1.7.0.0")] [assembly: AssemblyInformationalVersion("1.8.0.0")]
[assembly: AssemblyCopyright("2019 IT Center, RWTH Aachen University")] [assembly: AssemblyCopyright("2019 IT Center, RWTH Aachen University")]