Skip to content

Commit

Permalink
updated db migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Radoslav Radev committed Mar 9, 2024
1 parent d3b3bbd commit 062622f
Show file tree
Hide file tree
Showing 50 changed files with 637 additions and 35 deletions.
8 changes: 6 additions & 2 deletions Backend/Account/Account.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@
<ItemGroup>
<PackageReference Include="BCrypt.Net" Version="0.1.0" />
<PackageReference Include="Consul" Version="1.7.14.3" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0-rc.2.23480.2"/>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0-rc.2.23480.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Polly" Version="8.3.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.1" />
<PackageReference Include="Riok.Mapperly" Version="3.4.0" />
<PackageReference Include="Stripe.net" Version="43.17.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0"/>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.1.2" />
</ItemGroup>

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions Backend/Account/Migrations/20240309121534_InitialCreate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Account.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");

migrationBuilder.CreateTable(
name: "Accounts",
columns: table => new
{
AccId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Email = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
PasswordHashed = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Balance = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
SubscriptionValidUntil = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Accounts", x => x.AccId);
})
.Annotation("MySql:CharSet", "utf8mb4");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Accounts");
}
}
}
52 changes: 52 additions & 0 deletions Backend/Account/Migrations/DatabaseContextModelSnapshot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// <auto-generated />
using System;
using Account.Repository.EFC;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

namespace Account.Migrations
{
[DbContext(typeof(DatabaseContext))]
partial class DatabaseContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);

MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);

modelBuilder.Entity("Account.Repository.Entities.Account", b =>
{
b.Property<Guid>("AccId")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");

b.Property<decimal>("Balance")
.HasColumnType("decimal(18, 2)");

b.Property<string>("Email")
.IsRequired()
.HasColumnType("longtext");

b.Property<string>("PasswordHashed")
.IsRequired()
.HasColumnType("longtext");

b.Property<DateTime?>("SubscriptionValidUntil")
.HasColumnType("datetime(6)");

b.HasKey("AccId");

b.ToTable("Accounts");
});
#pragma warning restore 612, 618
}
}
}
1 change: 1 addition & 0 deletions Backend/OpenVidStreamer.ManagementNdiscovary/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
consul.exe
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
9c06faad-e0b5-e70f-ad18-d529049d8249
941a1d78-bcf2-ce80-cdd2-4a444c786a39


This signature is a randomly generated UUID used to de-duplicate
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-18735830-2ff0-4d59-858d-775a2b16434f","Name":"Service 'OpenVisStreamer.RecommendationAlgo' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-18735830-2ff0-4d59-858d-775a2b16434f","ServiceName":"OpenVisStreamer.RecommendationAlgo","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5006/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-4fd79d63-818e-4aa3-a150-bba8aeac77c0","Name":"Service 'OpenVisStreamer.RecommendationAlgo' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-4fd79d63-818e-4aa3-a150-bba8aeac77c0","ServiceName":"OpenVisStreamer.RecommendationAlgo","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5006/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-5a6d808b-1a1a-4dc1-9dcd-e999fa66863f","Name":"Service 'OpenVisStreamer.Upload' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-5a6d808b-1a1a-4dc1-9dcd-e999fa66863f","ServiceName":"OpenVisStreamer.Upload","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5008/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-63aa5e41-def8-470d-b199-ecc62f1e8ff5","Name":"Service 'OpenVisStreamer.Upload' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-63aa5e41-def8-470d-b199-ecc62f1e8ff5","ServiceName":"OpenVisStreamer.Upload","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5008/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-2fac3c74-5694-47a2-89a0-45c7b13f824f","Name":"Service 'OpenVisStreamer.Upload' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-2fac3c74-5694-47a2-89a0-45c7b13f824f","ServiceName":"OpenVisStreamer.Upload","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5008/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-f0e80451-b36e-4ea6-a517-7586cd2a271f","Name":"Service 'OpenVisStreamer.VideoLibrary' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-f0e80451-b36e-4ea6-a517-7586cd2a271f","ServiceName":"OpenVisStreamer.VideoLibrary","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5004/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-4fe37622-1df7-4a32-8cf0-775f254627ac","Name":"Service 'OpenVisStreamer.VideoLibrary' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-4fe37622-1df7-4a32-8cf0-775f254627ac","ServiceName":"OpenVisStreamer.VideoLibrary","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5004/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion Backend/OpenVidStreamer.ManagementNdiscovary/var/node-id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9dd4b92d-5da4-8eb5-9ba6-925d5d5a1a89
f576fa39-64b7-f602-5f9b-025f9482fd86
Binary file modified Backend/OpenVidStreamer.ManagementNdiscovary/var/raft/raft.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ alive: OpenVidStreamer.ManagementNdiscovary 127.0.0.1:8301
event-clock: 1
alive: OpenVidStreamer.ManagementNdiscovary 127.0.0.1:8301
event-clock: 2
alive: OpenVidStreamer.ManagementNdiscovary 127.0.0.1:8301
event-clock: 3
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
alive: OpenVidStreamer.ManagementNdiscovary.dc1 127.0.0.1:8302
alive: OpenVidStreamer.ManagementNdiscovary.dc1 127.0.0.1:8302
alive: OpenVidStreamer.ManagementNdiscovary.dc1 127.0.0.1:8302
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"last_seen_unix":1709549896}
{"last_seen_unix":1709993285}
Loading

0 comments on commit 062622f

Please sign in to comment.