Files
hamkadr/src/JobsMedical.Web/Migrations/20260604064943_SmsSettings.cs
T
soroush.asadi 17d38431bf
CI/CD / CI · dotnet build (push) Successful in 31s
CI/CD / Deploy · hamkadr (push) Successful in 56s
Add SEO sitemap/robots + real SMS OTP (Kavenegar, admin-configured)
- /sitemap.xml (static pages + open shifts + fresh jobs, respecting expiry) + /robots.txt (blocks /Admin,/Employer); base URL from forwarded request → https://hamkadr.ir in prod
- ISmsSender + KavenegarSmsSender (verify/lookup template, sms/send fallback); SMS settings (enabled/apikey/template/sender) in /Admin/Settings; OtpService.IssueAsync sends SMS and stops revealing the code when enabled (dev still shows it); migration

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 10:27:21 +03:30

63 lines
1.8 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JobsMedical.Web.Migrations
{
/// <inheritdoc />
public partial class SmsSettings : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "SmsApiKey",
table: "AppSettings",
type: "character varying(200)",
maxLength: 200,
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "SmsEnabled",
table: "AppSettings",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "SmsSender",
table: "AppSettings",
type: "character varying(30)",
maxLength: 30,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SmsTemplate",
table: "AppSettings",
type: "character varying(100)",
maxLength: 100,
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "SmsApiKey",
table: "AppSettings");
migrationBuilder.DropColumn(
name: "SmsEnabled",
table: "AppSettings");
migrationBuilder.DropColumn(
name: "SmsSender",
table: "AppSettings");
migrationBuilder.DropColumn(
name: "SmsTemplate",
table: "AppSettings");
}
}
}