Skip to content
Snippets Groups Projects
Commit fcb75564 authored by Petar Hristov's avatar Petar Hristov :speech_balloon:
Browse files

Fix: ParticipatingOrganizations are now only top-level organizations

parent b9f0475a
No related branches found
No related tags found
1 merge request!104Fix: Allowing only top-level organizations under participating organizations
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<RootNamespace>Coscine.Migrations</RootNamespace>
......@@ -30,6 +30,7 @@
<None Remove="Migrations\Migration202205051431WormResourceType_up.sql" />
<None Remove="Migrations\Migration202207191035GitlabResourceType_down.sql" />
<None Remove="Migrations\Migration202207191035GitlabResourceType_up.sql" />
<None Remove="Migrations\Migration202302271200TopLevelProjectOrganizations_up.sql" />
</ItemGroup>
<ItemGroup>
......@@ -55,6 +56,7 @@
<EmbeddedResource Include="Migrations\Migration202201241220TuDoResources_up.sql" />
<EmbeddedResource Include="Migrations\Migration202201190837NRWFHResources_down.sql" />
<EmbeddedResource Include="Migrations\Migration202201190837NRWFHResources_up.sql" />
<EmbeddedResource Include="Migrations\Migration202302271200TopLevelProjectOrganizations_up.sql" />
</ItemGroup>
<ItemGroup>
......
using FluentMigrator;
namespace Coscine.Migrations.Migrations
{
//yyyymmddhhmm
[Migration(202302271200)]
public class Migration202302271200TopLevelProjectOrganizations : Migration
{
public override void Up()
{
Execute.EmbeddedScript("Migration202302271200TopLevelProjectOrganizations_up.sql");
}
public override void Down()
{
// I've added no down script since the change itself has no correct reversal.
}
}
}
\ No newline at end of file
UPDATE ProjectInstitute
SET OrganizationUrl = LEFT(OrganizationUrl, CHARINDEX('#', OrganizationUrl + '#') - 1);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment