using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LittleShop.Migrations
{
///
public partial class AddProductMultiBuysTable : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Bots",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
BotKey = table.Column(type: "TEXT", maxLength: 256, nullable: false),
Name = table.Column(type: "TEXT", maxLength: 100, nullable: false),
Description = table.Column(type: "TEXT", maxLength: 500, nullable: false),
Type = table.Column(type: "INTEGER", nullable: false),
Status = table.Column(type: "INTEGER", nullable: false),
Settings = table.Column(type: "TEXT", nullable: false),
CreatedAt = table.Column(type: "TEXT", nullable: false),
LastSeenAt = table.Column(type: "TEXT", nullable: true),
LastConfigSyncAt = table.Column(type: "TEXT", nullable: true),
IsActive = table.Column(type: "INTEGER", nullable: false),
Version = table.Column(type: "TEXT", maxLength: 50, nullable: false),
IpAddress = table.Column(type: "TEXT", maxLength: 50, nullable: false),
PlatformUsername = table.Column(type: "TEXT", maxLength: 100, nullable: false),
PlatformDisplayName = table.Column(type: "TEXT", maxLength: 200, nullable: false),
PlatformId = table.Column(type: "TEXT", maxLength: 100, nullable: false),
PersonalityName = table.Column(type: "TEXT", maxLength: 50, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Bots", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Categories",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
Name = table.Column(type: "TEXT", maxLength: 100, nullable: false),
Description = table.Column(type: "TEXT", maxLength: 500, nullable: true),
CreatedAt = table.Column(type: "TEXT", nullable: false),
UpdatedAt = table.Column(type: "TEXT", nullable: false),
IsActive = table.Column(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Categories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Customers",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
TelegramUserId = table.Column(type: "INTEGER", nullable: false),
TelegramUsername = table.Column(type: "TEXT", maxLength: 100, nullable: false),
TelegramDisplayName = table.Column(type: "TEXT", maxLength: 200, nullable: false),
TelegramFirstName = table.Column(type: "TEXT", maxLength: 50, nullable: false),
TelegramLastName = table.Column(type: "TEXT", maxLength: 50, nullable: false),
Email = table.Column(type: "TEXT", maxLength: 100, nullable: true),
PhoneNumber = table.Column(type: "TEXT", maxLength: 20, nullable: true),
AllowMarketing = table.Column(type: "INTEGER", nullable: false),
AllowOrderUpdates = table.Column(type: "INTEGER", nullable: false),
Language = table.Column(type: "TEXT", maxLength: 10, nullable: false),
Timezone = table.Column(type: "TEXT", maxLength: 10, nullable: false),
TotalOrders = table.Column(type: "INTEGER", nullable: false),
TotalSpent = table.Column(type: "decimal(18,2)", nullable: false),
AverageOrderValue = table.Column(type: "decimal(18,2)", nullable: false),
FirstOrderDate = table.Column(type: "TEXT", nullable: false),
LastOrderDate = table.Column(type: "TEXT", nullable: false),
CustomerNotes = table.Column(type: "TEXT", maxLength: 2000, nullable: true),
IsBlocked = table.Column(type: "INTEGER", nullable: false),
BlockReason = table.Column(type: "TEXT", maxLength: 500, nullable: true),
RiskScore = table.Column(type: "INTEGER", nullable: false),
SuccessfulOrders = table.Column(type: "INTEGER", nullable: false),
CancelledOrders = table.Column(type: "INTEGER", nullable: false),
DisputedOrders = table.Column(type: "INTEGER", nullable: false),
CreatedAt = table.Column(type: "TEXT", nullable: false),
UpdatedAt = table.Column(type: "TEXT", nullable: false),
LastActiveAt = table.Column(type: "TEXT", nullable: false),
DataRetentionDate = table.Column(type: "TEXT", nullable: true),
IsActive = table.Column(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Customers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ShippingRates",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
Name = table.Column(type: "TEXT", maxLength: 100, nullable: false),
Description = table.Column(type: "TEXT", maxLength: 500, nullable: true),
Country = table.Column(type: "TEXT", maxLength: 100, nullable: false),
MinWeight = table.Column(type: "decimal(18,2)", nullable: false),
MaxWeight = table.Column(type: "decimal(18,2)", nullable: false),
Price = table.Column(type: "decimal(18,2)", nullable: false),
MinDeliveryDays = table.Column(type: "INTEGER", nullable: false),
MaxDeliveryDays = table.Column(type: "INTEGER", nullable: false),
IsActive = table.Column(type: "INTEGER", nullable: false),
CreatedAt = table.Column(type: "TEXT", nullable: false),
UpdatedAt = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ShippingRates", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
Username = table.Column(type: "TEXT", maxLength: 50, nullable: false),
PasswordHash = table.Column(type: "TEXT", nullable: false),
Email = table.Column(type: "TEXT", maxLength: 100, nullable: true),
Role = table.Column(type: "TEXT", maxLength: 50, nullable: false),
CreatedAt = table.Column(type: "TEXT", nullable: false),
IsActive = table.Column(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Id);
});
migrationBuilder.CreateTable(
name: "BotMetrics",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
BotId = table.Column(type: "TEXT", nullable: false),
MetricType = table.Column(type: "INTEGER", nullable: false),
Value = table.Column(type: "TEXT", nullable: false),
Metadata = table.Column(type: "TEXT", nullable: false),
RecordedAt = table.Column(type: "TEXT", nullable: false),
Category = table.Column(type: "TEXT", maxLength: 100, nullable: false),
Description = table.Column(type: "TEXT", maxLength: 500, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_BotMetrics", x => x.Id);
table.ForeignKey(
name: "FK_BotMetrics_Bots_BotId",
column: x => x.BotId,
principalTable: "Bots",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "BotSessions",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
BotId = table.Column(type: "TEXT", nullable: false),
SessionIdentifier = table.Column(type: "TEXT", maxLength: 256, nullable: false),
Platform = table.Column(type: "TEXT", maxLength: 100, nullable: false),
StartedAt = table.Column(type: "TEXT", nullable: false),
LastActivityAt = table.Column(type: "TEXT", nullable: false),
EndedAt = table.Column(type: "TEXT", nullable: true),
OrderCount = table.Column(type: "INTEGER", nullable: false),
MessageCount = table.Column(type: "INTEGER", nullable: false),
TotalSpent = table.Column(type: "TEXT", nullable: false),
Language = table.Column(type: "TEXT", maxLength: 50, nullable: false),
Country = table.Column(type: "TEXT", maxLength: 100, nullable: false),
IsAnonymous = table.Column(type: "INTEGER", nullable: false),
Metadata = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_BotSessions", x => x.Id);
table.ForeignKey(
name: "FK_BotSessions_Bots_BotId",
column: x => x.BotId,
principalTable: "Bots",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Products",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
Name = table.Column(type: "TEXT", maxLength: 200, nullable: false),
Description = table.Column(type: "TEXT", nullable: false),
Price = table.Column(type: "decimal(18,2)", nullable: false),
Weight = table.Column(type: "decimal(18,4)", nullable: false),
WeightUnit = table.Column(type: "INTEGER", nullable: false),
StockQuantity = table.Column(type: "INTEGER", nullable: false),
CategoryId = table.Column(type: "TEXT", nullable: false),
IsActive = table.Column(type: "INTEGER", nullable: false),
CreatedAt = table.Column(type: "TEXT", nullable: false),
UpdatedAt = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Products", x => x.Id);
table.ForeignKey(
name: "FK_Products_Categories_CategoryId",
column: x => x.CategoryId,
principalTable: "Categories",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "BotContacts",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
BotId = table.Column(type: "TEXT", nullable: false),
TelegramUserId = table.Column(type: "INTEGER", nullable: false),
TelegramUsername = table.Column(type: "TEXT", maxLength: 100, nullable: false),
DisplayName = table.Column(type: "TEXT", maxLength: 200, nullable: false),
FirstName = table.Column(type: "TEXT", maxLength: 50, nullable: false),
LastName = table.Column(type: "TEXT", maxLength: 50, nullable: false),
FirstContactDate = table.Column(type: "TEXT", nullable: false),
LastContactDate = table.Column(type: "TEXT", nullable: false),
TotalInteractions = table.Column(type: "INTEGER", nullable: false),
LastKnownLanguage = table.Column(type: "TEXT", nullable: false),
Status = table.Column(type: "INTEGER", nullable: false),
StatusReason = table.Column(type: "TEXT", nullable: true),
CustomerId = table.Column(type: "TEXT", nullable: true),
IsRecovered = table.Column(type: "INTEGER", nullable: false),
RecoveredFromBotId = table.Column(type: "TEXT", nullable: true),
RecoveredAt = table.Column(type: "TEXT", nullable: true),
CreatedAt = table.Column(type: "TEXT", nullable: false),
UpdatedAt = table.Column(type: "TEXT", nullable: false),
IsActive = table.Column(type: "INTEGER", nullable: false),
EncryptedContactData = table.Column(type: "TEXT", maxLength: 500, nullable: true),
Preferences = table.Column(type: "TEXT", maxLength: 500, nullable: true),
Notes = table.Column(type: "TEXT", maxLength: 1000, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_BotContacts", x => x.Id);
table.ForeignKey(
name: "FK_BotContacts_Bots_BotId",
column: x => x.BotId,
principalTable: "Bots",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_BotContacts_Customers_CustomerId",
column: x => x.CustomerId,
principalTable: "Customers",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "Orders",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
CustomerId = table.Column(type: "TEXT", nullable: true),
IdentityReference = table.Column(type: "TEXT", maxLength: 100, nullable: true),
Status = table.Column(type: "INTEGER", nullable: false),
TotalAmount = table.Column(type: "decimal(18,2)", nullable: false),
Currency = table.Column(type: "TEXT", maxLength: 10, nullable: false),
ShippingName = table.Column(type: "TEXT", maxLength: 200, nullable: false),
ShippingAddress = table.Column(type: "TEXT", maxLength: 500, nullable: false),
ShippingCity = table.Column(type: "TEXT", maxLength: 100, nullable: false),
ShippingPostCode = table.Column(type: "TEXT", maxLength: 20, nullable: false),
ShippingCountry = table.Column(type: "TEXT", maxLength: 100, nullable: false),
Notes = table.Column(type: "TEXT", maxLength: 500, nullable: true),
TrackingNumber = table.Column(type: "TEXT", maxLength: 100, nullable: true),
CreatedAt = table.Column(type: "TEXT", nullable: false),
UpdatedAt = table.Column(type: "TEXT", nullable: false),
PaidAt = table.Column(type: "TEXT", nullable: true),
AcceptedAt = table.Column(type: "TEXT", nullable: true),
PackingStartedAt = table.Column(type: "TEXT", nullable: true),
DispatchedAt = table.Column(type: "TEXT", nullable: true),
ExpectedDeliveryDate = table.Column(type: "TEXT", nullable: true),
ActualDeliveryDate = table.Column(type: "TEXT", nullable: true),
OnHoldAt = table.Column(type: "TEXT", nullable: true),
AcceptedByUser = table.Column(type: "TEXT", maxLength: 100, nullable: true),
PackedByUser = table.Column(type: "TEXT", maxLength: 100, nullable: true),
DispatchedByUser = table.Column(type: "TEXT", maxLength: 100, nullable: true),
OnHoldReason = table.Column(type: "TEXT", maxLength: 500, nullable: true),
ShippedAt = table.Column(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Orders", x => x.Id);
table.ForeignKey(
name: "FK_Orders_Customers_CustomerId",
column: x => x.CustomerId,
principalTable: "Customers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "PushSubscriptions",
columns: table => new
{
Id = table.Column(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Endpoint = table.Column(type: "TEXT", nullable: false),
P256DH = table.Column(type: "TEXT", nullable: false),
Auth = table.Column(type: "TEXT", nullable: false),
UserId = table.Column(type: "TEXT", nullable: true),
CustomerId = table.Column(type: "TEXT", nullable: true),
SubscribedAt = table.Column(type: "TEXT", nullable: false),
LastUsedAt = table.Column(type: "TEXT", nullable: true),
IsActive = table.Column(type: "INTEGER", nullable: false),
UserAgent = table.Column(type: "TEXT", nullable: true),
IpAddress = table.Column(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PushSubscriptions", x => x.Id);
table.ForeignKey(
name: "FK_PushSubscriptions_Customers_CustomerId",
column: x => x.CustomerId,
principalTable: "Customers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_PushSubscriptions_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ProductMultiBuys",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
ProductId = table.Column(type: "TEXT", nullable: false),
Name = table.Column(type: "TEXT", maxLength: 100, nullable: false),
Description = table.Column(type: "TEXT", nullable: false),
Quantity = table.Column(type: "INTEGER", nullable: false),
Price = table.Column(type: "decimal(18,2)", nullable: false),
PricePerUnit = table.Column(type: "decimal(18,2)", nullable: false),
SortOrder = table.Column(type: "INTEGER", nullable: false),
IsActive = table.Column(type: "INTEGER", nullable: false),
CreatedAt = table.Column(type: "TEXT", nullable: false),
UpdatedAt = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductMultiBuys", x => x.Id);
table.ForeignKey(
name: "FK_ProductMultiBuys_Products_ProductId",
column: x => x.ProductId,
principalTable: "Products",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ProductPhotos",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
ProductId = table.Column(type: "TEXT", nullable: false),
FileName = table.Column(type: "TEXT", maxLength: 500, nullable: false),
FilePath = table.Column(type: "TEXT", maxLength: 1000, nullable: false),
AltText = table.Column(type: "TEXT", maxLength: 100, nullable: true),
SortOrder = table.Column(type: "INTEGER", nullable: false),
CreatedAt = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductPhotos", x => x.Id);
table.ForeignKey(
name: "FK_ProductPhotos_Products_ProductId",
column: x => x.ProductId,
principalTable: "Products",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ProductVariants",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
ProductId = table.Column(type: "TEXT", nullable: false),
Name = table.Column(type: "TEXT", maxLength: 100, nullable: false),
VariantType = table.Column(type: "TEXT", maxLength: 50, nullable: false),
SortOrder = table.Column(type: "INTEGER", nullable: false),
IsActive = table.Column(type: "INTEGER", nullable: false),
StockLevel = table.Column(type: "INTEGER", nullable: false),
CreatedAt = table.Column(type: "TEXT", nullable: false),
UpdatedAt = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductVariants", x => x.Id);
table.ForeignKey(
name: "FK_ProductVariants_Products_ProductId",
column: x => x.ProductId,
principalTable: "Products",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "BotActivities",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
BotId = table.Column(type: "TEXT", nullable: false),
SessionIdentifier = table.Column(type: "TEXT", maxLength: 256, nullable: false),
UserDisplayName = table.Column(type: "TEXT", maxLength: 100, nullable: false),
ActivityType = table.Column(type: "TEXT", maxLength: 50, nullable: false),
ActivityDescription = table.Column(type: "TEXT", maxLength: 500, nullable: false),
ProductId = table.Column(type: "TEXT", nullable: true),
ProductName = table.Column(type: "TEXT", maxLength: 200, nullable: false),
OrderId = table.Column(type: "TEXT", nullable: true),
CategoryName = table.Column(type: "TEXT", maxLength: 100, nullable: false),
Value = table.Column(type: "TEXT", nullable: true),
Quantity = table.Column(type: "INTEGER", nullable: true),
Platform = table.Column(type: "TEXT", maxLength: 100, nullable: false),
DeviceType = table.Column(type: "TEXT", maxLength: 50, nullable: false),
Location = table.Column(type: "TEXT", maxLength: 100, nullable: false),
Timestamp = table.Column(type: "TEXT", nullable: false),
Metadata = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_BotActivities", x => x.Id);
table.ForeignKey(
name: "FK_BotActivities_Bots_BotId",
column: x => x.BotId,
principalTable: "Bots",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_BotActivities_Orders_OrderId",
column: x => x.OrderId,
principalTable: "Orders",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "FK_BotActivities_Products_ProductId",
column: x => x.ProductId,
principalTable: "Products",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
});
migrationBuilder.CreateTable(
name: "CryptoPayments",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
OrderId = table.Column(type: "TEXT", nullable: false),
Currency = table.Column(type: "INTEGER", nullable: false),
WalletAddress = table.Column(type: "TEXT", maxLength: 500, nullable: false),
RequiredAmount = table.Column(type: "decimal(18,8)", nullable: false),
PaidAmount = table.Column(type: "decimal(18,8)", nullable: false),
Status = table.Column(type: "INTEGER", nullable: false),
BTCPayInvoiceId = table.Column(type: "TEXT", maxLength: 200, nullable: true),
SilverPayOrderId = table.Column(type: "TEXT", maxLength: 200, nullable: true),
TransactionHash = table.Column(type: "TEXT", maxLength: 200, nullable: true),
CreatedAt = table.Column(type: "TEXT", nullable: false),
PaidAt = table.Column(type: "TEXT", nullable: true),
ExpiresAt = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CryptoPayments", x => x.Id);
table.ForeignKey(
name: "FK_CryptoPayments_Orders_OrderId",
column: x => x.OrderId,
principalTable: "Orders",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CustomerMessages",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
CustomerId = table.Column(type: "TEXT", nullable: false),
OrderId = table.Column(type: "TEXT", nullable: true),
AdminUserId = table.Column(type: "TEXT", nullable: true),
Direction = table.Column(type: "INTEGER", nullable: false),
Type = table.Column(type: "INTEGER", nullable: false),
Subject = table.Column(type: "TEXT", maxLength: 100, nullable: false),
Content = table.Column(type: "TEXT", maxLength: 4000, nullable: false),
Status = table.Column(type: "INTEGER", nullable: false),
CreatedAt = table.Column(type: "TEXT", nullable: false),
SentAt = table.Column(type: "TEXT", nullable: true),
DeliveredAt = table.Column(type: "TEXT", nullable: true),
ReadAt = table.Column(type: "TEXT", nullable: true),
FailedAt = table.Column(type: "TEXT", nullable: true),
FailureReason = table.Column(type: "TEXT", maxLength: 500, nullable: true),
RetryCount = table.Column(type: "INTEGER", nullable: false),
NextRetryAt = table.Column(type: "TEXT", nullable: true),
ParentMessageId = table.Column(type: "TEXT", nullable: true),
ThreadId = table.Column(type: "TEXT", nullable: true),
Platform = table.Column(type: "TEXT", maxLength: 100, nullable: false),
PlatformMessageId = table.Column(type: "TEXT", maxLength: 200, nullable: true),
Priority = table.Column(type: "INTEGER", nullable: false),
ScheduledFor = table.Column(type: "TEXT", nullable: true),
ExpiresAt = table.Column(type: "TEXT", nullable: true),
RequiresResponse = table.Column(type: "INTEGER", nullable: false),
IsUrgent = table.Column(type: "INTEGER", nullable: false),
IsMarketing = table.Column(type: "INTEGER", nullable: false),
IsAutoGenerated = table.Column(type: "INTEGER", nullable: false),
AutoGenerationTrigger = table.Column(type: "TEXT", maxLength: 100, nullable: true),
IsArchived = table.Column(type: "INTEGER", nullable: false),
ArchivedAt = table.Column(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomerMessages", x => x.Id);
table.ForeignKey(
name: "FK_CustomerMessages_CustomerMessages_ParentMessageId",
column: x => x.ParentMessageId,
principalTable: "CustomerMessages",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_CustomerMessages_Customers_CustomerId",
column: x => x.CustomerId,
principalTable: "Customers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CustomerMessages_Orders_OrderId",
column: x => x.OrderId,
principalTable: "Orders",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "FK_CustomerMessages_Users_AdminUserId",
column: x => x.AdminUserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
});
migrationBuilder.CreateTable(
name: "Reviews",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
ProductId = table.Column