ApplicationInstance porte désormais AppName (traductions, jsonb), IsQRCodeEnabled (défaut true) et les liens App Store / Play Store. Une ligne existe par (instance, type d'app) : chaque réglage vaut donc séparément pour le mobile et pour le web. Les liens stores ne sont modifiables que par un SuperAdmin — c'est Unov qui publie les apps —, contrôlé côté API et pas seulement masqué dans l'UI. La liste anonyme des apps expose le slug web et le nom de l'instance : la page /download de visitapp-web n'a que l'instanceId d'un QR imprimé. Réserve les slugs download, demo et api : un segment statique de visitapp-web l'emporte sur [slug], l'instance serait inaccessible. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
60 lines
1.8 KiB
C#
60 lines
1.8 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace ManagerService.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddAppNameQrAndStoresToApplicationInstance : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "AppName",
|
|
table: "ApplicationInstances",
|
|
type: "jsonb",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "AppStoreUrl",
|
|
table: "ApplicationInstances",
|
|
type: "text",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsQRCodeEnabled",
|
|
table: "ApplicationInstances",
|
|
type: "boolean",
|
|
nullable: false,
|
|
defaultValue: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "PlayStoreUrl",
|
|
table: "ApplicationInstances",
|
|
type: "text",
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "AppName",
|
|
table: "ApplicationInstances");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "AppStoreUrl",
|
|
table: "ApplicationInstances");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsQRCodeEnabled",
|
|
table: "ApplicationInstances");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PlayStoreUrl",
|
|
table: "ApplicationInstances");
|
|
}
|
|
}
|
|
}
|