mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
MySQL migration
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Govor.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -19,14 +18,14 @@ namespace Govor.Data.Migrations
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.6")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Govor.Core.Models.Admin", b =>
|
||||
{
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("UserId");
|
||||
|
||||
@@ -37,25 +36,25 @@ namespace Govor.Data.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.PrimitiveCollection<List<Guid>>("Admins")
|
||||
b.PrimitiveCollection<string>("Admins")
|
||||
.IsRequired()
|
||||
.HasColumnType("uuid[]");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.PrimitiveCollection<List<string>>("InviteCode")
|
||||
b.PrimitiveCollection<string>("InviteCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("text[]");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsChannel")
|
||||
.HasColumnType("boolean");
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("IsPrivate")
|
||||
.HasColumnType("boolean");
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -66,16 +65,16 @@ namespace Govor.Data.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("AddresseeId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("RequesterId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("integer");
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -90,13 +89,13 @@ namespace Govor.Data.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("GroupId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -107,16 +106,16 @@ namespace Govor.Data.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("GroupId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<bool>("IsBanned")
|
||||
.HasColumnType("boolean");
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -127,30 +126,30 @@ namespace Govor.Data.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("DateCreated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("EndDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("boolean");
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("IsAdmin")
|
||||
.HasColumnType("boolean");
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("MaxParticipants")
|
||||
.HasColumnType("integer");
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -161,26 +160,26 @@ namespace Govor.Data.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("EncryptedKey")
|
||||
.HasMaxLength(512)
|
||||
.HasColumnType("character varying(512)");
|
||||
.HasColumnType("varchar(512)");
|
||||
|
||||
b.Property<string>("FilePath")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid>("MessageId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("MimeType")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -193,35 +192,35 @@ namespace Govor.Data.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime?>("EditedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("EncryptedContent")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsEdited")
|
||||
.HasColumnType("boolean");
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<Guid?>("PrivateChatId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("RecipientId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<int>("RecipientType")
|
||||
.HasColumnType("integer");
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("ReplyToMessageId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("SenderId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime>("SentAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -236,21 +235,21 @@ namespace Govor.Data.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("MessageId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime>("ReactedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("ReactionCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
.HasColumnType("varchar(64)");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -266,16 +265,16 @@ namespace Govor.Data.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("MessageId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime>("ViewedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -289,13 +288,13 @@ namespace Govor.Data.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("UserAId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("UserBId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -306,31 +305,31 @@ namespace Govor.Data.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateOnly>("CreatedOn")
|
||||
.HasColumnType("date");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid>("IconId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("InviteId")
|
||||
.HasColumnType("uuid");
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("WasOnline")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user