diff --git a/src/Migrations/Migrations.csproj b/src/Migrations/Migrations.csproj index 844c77a521b435a196d7c647dfc3de3b552645dc..bf6494789be224398b46003bd124261d5e0502aa 100644 --- a/src/Migrations/Migrations.csproj +++ b/src/Migrations/Migrations.csproj @@ -9,7 +9,7 @@ <PropertyGroup> <Authors>RWTH Aachen University</Authors> <Company>IT Center, RWTH Aachen University</Company> - <Copyright>2021 IT Center, RWTH Aachen University</Copyright> + <Copyright>2022 IT Center, RWTH Aachen University</Copyright> <Description>Migrations is a part of the Coscine group.</Description> <PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageProjectUrl>https://git.rwth-aachen.de/coscine/backend/libraries/Migrations</PackageProjectUrl> diff --git a/src/Migrations/Migrations/Migration202211040919LogDbIndex.cs b/src/Migrations/Migrations/Migration202211040919LogDbIndex.cs new file mode 100644 index 0000000000000000000000000000000000000000..7bc030bdf854094eb093767527abdc1980dda556 --- /dev/null +++ b/src/Migrations/Migrations/Migration202211040919LogDbIndex.cs @@ -0,0 +1,22 @@ +using FluentMigrator; + +namespace Coscine.Migrations.Migrations +{ + //yyyymmddhhmm + [Migration(202211040919)] + public class Migration202211040919LogDbIndex : Migration + { + public override void Down() + { + Delete.Index("log_idx_userid_loglevel_servertime").OnTable("Log"); + } + + public override void Up() + { + Create.Index("log_idx_userid_loglevel_servertime").OnTable("Log") + .OnColumn("UserId").Ascending() + .OnColumn("LogLevel").Ascending() + .OnColumn("ServerTimestamp").Ascending(); + } + } +} \ No newline at end of file