using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Cleanuparr.Persistence.Postgres.Migrations.Data
{
///
public partial class InitialPostgres : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
name: "data");
migrationBuilder.CreateTable(
name: "arr_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
type = table.Column(type: "text", nullable: false),
failed_import_max_strikes = table.Column(type: "smallint", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_arr_configs", x => x.id);
});
migrationBuilder.CreateTable(
name: "blacklist_sync_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
enabled = table.Column(type: "boolean", nullable: false),
cron_expression = table.Column(type: "text", nullable: false),
blacklist_path = table.Column(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_blacklist_sync_configs", x => x.id);
});
migrationBuilder.CreateTable(
name: "content_blocker_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
enabled = table.Column(type: "boolean", nullable: false),
cron_expression = table.Column(type: "text", nullable: false),
use_advanced_scheduling = table.Column(type: "boolean", nullable: false),
ignore_private = table.Column(type: "boolean", nullable: false),
delete_private = table.Column(type: "boolean", nullable: false),
process_no_content_id = table.Column(type: "boolean", nullable: false),
delete_if_any_file_blocked = table.Column(type: "boolean", nullable: false),
ignored_downloads = table.Column>(type: "text[]", nullable: false),
lidarr_blocklist_path = table.Column(type: "text", nullable: true),
lidarr_blocklist_type = table.Column(type: "text", nullable: false),
lidarr_enabled = table.Column(type: "boolean", nullable: false),
radarr_blocklist_path = table.Column(type: "text", nullable: true),
radarr_blocklist_type = table.Column(type: "text", nullable: false),
radarr_enabled = table.Column(type: "boolean", nullable: false),
readarr_blocklist_path = table.Column(type: "text", nullable: true),
readarr_blocklist_type = table.Column(type: "text", nullable: false),
readarr_enabled = table.Column(type: "boolean", nullable: false),
sonarr_blocklist_path = table.Column(type: "text", nullable: true),
sonarr_blocklist_type = table.Column(type: "text", nullable: false),
sonarr_enabled = table.Column(type: "boolean", nullable: false),
whisparr_blocklist_path = table.Column(type: "text", nullable: true),
whisparr_blocklist_type = table.Column(type: "integer", nullable: false),
whisparr_enabled = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_content_blocker_configs", x => x.id);
});
migrationBuilder.CreateTable(
name: "download_cleaner_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
enabled = table.Column(type: "boolean", nullable: false),
cron_expression = table.Column(type: "text", nullable: false),
use_advanced_scheduling = table.Column(type: "boolean", nullable: false),
ignored_downloads = table.Column>(type: "text[]", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_download_cleaner_configs", x => x.id);
});
migrationBuilder.CreateTable(
name: "download_clients",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
enabled = table.Column(type: "boolean", nullable: false),
name = table.Column(type: "text", nullable: false),
type_name = table.Column(type: "text", nullable: false),
type = table.Column(type: "text", nullable: false),
host = table.Column(type: "text", nullable: true),
username = table.Column(type: "text", nullable: true),
password = table.Column(type: "text", nullable: true),
url_base = table.Column(type: "text", nullable: true),
external_url = table.Column(type: "text", nullable: true),
download_directory_source = table.Column(type: "text", nullable: true),
download_directory_target = table.Column(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_download_clients", x => x.id);
});
migrationBuilder.CreateTable(
name: "general_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
display_support_banner = table.Column(type: "boolean", nullable: false),
dry_run = table.Column(type: "boolean", nullable: false),
http_max_retries = table.Column(type: "integer", nullable: false),
http_timeout = table.Column(type: "integer", nullable: false),
http_certificate_validation = table.Column(type: "text", nullable: false),
status_check_enabled = table.Column(type: "boolean", nullable: false),
encryption_key = table.Column(type: "text", nullable: false),
ignored_downloads = table.Column>(type: "text[]", nullable: false),
strike_inactivity_window_hours = table.Column(type: "integer", nullable: false),
history_retention_days = table.Column(type: "integer", nullable: false),
auth_disable_auth_for_local_addresses = table.Column(type: "boolean", nullable: false),
auth_trust_forwarded_headers = table.Column(type: "boolean", nullable: false),
auth_trusted_networks = table.Column(type: "text", nullable: false),
log_archive_enabled = table.Column(type: "boolean", nullable: false),
log_archive_retained_count = table.Column(type: "integer", nullable: false),
log_archive_time_limit_hours = table.Column(type: "integer", nullable: false),
log_level = table.Column(type: "text", nullable: false),
log_retained_file_count = table.Column(type: "integer", nullable: false),
log_rolling_size_mb = table.Column(type: "integer", nullable: false),
log_time_limit_hours = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_general_configs", x => x.id);
});
migrationBuilder.CreateTable(
name: "notification_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
name = table.Column(type: "character varying(100)", maxLength: 100, nullable: false),
type = table.Column(type: "text", nullable: false),
is_enabled = table.Column(type: "boolean", nullable: false),
on_failed_import_strike = table.Column(type: "boolean", nullable: false),
on_stalled_strike = table.Column(type: "boolean", nullable: false),
on_slow_strike = table.Column(type: "boolean", nullable: false),
on_queue_item_deleted = table.Column(type: "boolean", nullable: false),
on_download_cleaned = table.Column(type: "boolean", nullable: false),
on_category_changed = table.Column(type: "boolean", nullable: false),
on_search_triggered = table.Column(type: "boolean", nullable: false),
on_search_item_grabbed = table.Column(type: "boolean", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false),
updated_at = table.Column(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_notification_configs", x => x.id);
});
migrationBuilder.CreateTable(
name: "queue_cleaner_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
enabled = table.Column(type: "boolean", nullable: false),
cron_expression = table.Column(type: "text", nullable: false),
use_advanced_scheduling = table.Column(type: "boolean", nullable: false),
ignored_downloads = table.Column>(type: "text[]", nullable: false),
process_no_content_id = table.Column(type: "boolean", nullable: false),
downloading_metadata_max_strikes = table.Column(type: "integer", nullable: false),
failed_import_change_category = table.Column(type: "boolean", nullable: false),
failed_import_delete_private = table.Column(type: "boolean", nullable: false),
failed_import_ignore_private = table.Column(type: "boolean", nullable: false),
failed_import_max_strikes = table.Column(type: "integer", nullable: false),
failed_import_pattern_mode = table.Column(type: "text", nullable: false),
failed_import_patterns = table.Column(type: "text[]", nullable: false),
failed_import_skip_if_not_found_in_client = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_queue_cleaner_configs", x => x.id);
});
migrationBuilder.CreateTable(
name: "seeker_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
search_enabled = table.Column(type: "boolean", nullable: false),
search_interval = table.Column(type: "integer", nullable: false),
proactive_search_enabled = table.Column(type: "boolean", nullable: false),
selection_strategy = table.Column(type: "text", nullable: false),
use_round_robin = table.Column(type: "boolean", nullable: false),
post_release_grace_hours = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_seeker_configs", x => x.id);
});
migrationBuilder.CreateTable(
name: "arr_instances",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
enabled = table.Column(type: "boolean", nullable: false),
version = table.Column(type: "real", nullable: false),
arr_config_id = table.Column(type: "uuid", nullable: false),
name = table.Column(type: "text", nullable: false),
url = table.Column(type: "text", nullable: false),
external_url = table.Column(type: "text", nullable: true),
api_key = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_arr_instances", x => x.id);
table.ForeignKey(
name: "fk_arr_instances_arr_configs_arr_config_id",
column: x => x.arr_config_id,
principalSchema: "data",
principalTable: "arr_configs",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "blacklist_sync_history",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
hash = table.Column(type: "text", nullable: false),
download_client_id = table.Column(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_blacklist_sync_history", x => x.id);
table.ForeignKey(
name: "fk_blacklist_sync_history_download_clients_download_client_id",
column: x => x.download_client_id,
principalSchema: "data",
principalTable: "download_clients",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "dead_torrent_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
download_client_config_id = table.Column(type: "uuid", nullable: false),
enabled = table.Column(type: "boolean", nullable: false),
target_category = table.Column(type: "text", nullable: false),
use_tag = table.Column(type: "boolean", nullable: false),
max_strikes = table.Column(type: "integer", nullable: false),
categories = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_dead_torrent_configs", x => x.id);
table.ForeignKey(
name: "fk_dead_torrent_configs_download_clients_download_client_confi",
column: x => x.download_client_config_id,
principalSchema: "data",
principalTable: "download_clients",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "deluge_seeding_rules",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
download_client_config_id = table.Column(type: "uuid", nullable: false),
name = table.Column(type: "text", nullable: false),
categories = table.Column(type: "text", nullable: false),
tracker_patterns = table.Column(type: "text", nullable: false),
priority = table.Column(type: "integer", nullable: false),
privacy_type = table.Column(type: "text", nullable: false),
max_ratio = table.Column(type: "double precision", nullable: false),
min_seed_time = table.Column(type: "double precision", nullable: false),
max_seed_time = table.Column(type: "double precision", nullable: false),
min_seeders = table.Column(type: "integer", nullable: false),
delete_source_files = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_deluge_seeding_rules", x => x.id);
table.ForeignKey(
name: "fk_deluge_seeding_rules_download_clients_download_client_confi",
column: x => x.download_client_config_id,
principalSchema: "data",
principalTable: "download_clients",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "orphaned_files_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
download_client_config_id = table.Column(type: "uuid", nullable: false),
enabled = table.Column(type: "boolean", nullable: false),
scan_directories = table.Column(type: "text", nullable: false),
orphaned_directory = table.Column(type: "text", nullable: false),
exclude_patterns = table.Column(type: "text", nullable: false),
min_file_age_hours = table.Column(type: "integer", nullable: false),
purge_after_hours = table.Column(type: "integer", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_orphaned_files_configs", x => x.id);
table.ForeignKey(
name: "fk_orphaned_files_configs_download_clients_download_client_con",
column: x => x.download_client_config_id,
principalSchema: "data",
principalTable: "download_clients",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "q_bit_seeding_rules",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
download_client_config_id = table.Column(type: "uuid", nullable: false),
name = table.Column(type: "text", nullable: false),
categories = table.Column(type: "text", nullable: false),
tracker_patterns = table.Column(type: "text", nullable: false),
tags_any = table.Column(type: "text", nullable: false),
tags_all = table.Column(type: "text", nullable: false),
priority = table.Column(type: "integer", nullable: false),
privacy_type = table.Column(type: "text", nullable: false),
max_ratio = table.Column(type: "double precision", nullable: false),
min_seed_time = table.Column(type: "double precision", nullable: false),
max_seed_time = table.Column(type: "double precision", nullable: false),
min_seeders = table.Column(type: "integer", nullable: false),
delete_source_files = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_q_bit_seeding_rules", x => x.id);
table.ForeignKey(
name: "fk_q_bit_seeding_rules_download_clients_download_client_config",
column: x => x.download_client_config_id,
principalSchema: "data",
principalTable: "download_clients",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "r_torrent_seeding_rules",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
download_client_config_id = table.Column(type: "uuid", nullable: false),
name = table.Column(type: "text", nullable: false),
categories = table.Column(type: "text", nullable: false),
tracker_patterns = table.Column(type: "text", nullable: false),
priority = table.Column(type: "integer", nullable: false),
privacy_type = table.Column(type: "text", nullable: false),
max_ratio = table.Column(type: "double precision", nullable: false),
min_seed_time = table.Column(type: "double precision", nullable: false),
max_seed_time = table.Column(type: "double precision", nullable: false),
delete_source_files = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_r_torrent_seeding_rules", x => x.id);
table.ForeignKey(
name: "fk_r_torrent_seeding_rules_download_clients_download_client_co",
column: x => x.download_client_config_id,
principalSchema: "data",
principalTable: "download_clients",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "transmission_seeding_rules",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
download_client_config_id = table.Column(type: "uuid", nullable: false),
name = table.Column(type: "text", nullable: false),
categories = table.Column(type: "text", nullable: false),
tracker_patterns = table.Column(type: "text", nullable: false),
tags_any = table.Column(type: "text", nullable: false),
tags_all = table.Column(type: "text", nullable: false),
priority = table.Column(type: "integer", nullable: false),
privacy_type = table.Column(type: "text", nullable: false),
max_ratio = table.Column(type: "double precision", nullable: false),
min_seed_time = table.Column(type: "double precision", nullable: false),
max_seed_time = table.Column(type: "double precision", nullable: false),
min_seeders = table.Column(type: "integer", nullable: false),
delete_source_files = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_transmission_seeding_rules", x => x.id);
table.ForeignKey(
name: "fk_transmission_seeding_rules_download_clients_download_client",
column: x => x.download_client_config_id,
principalSchema: "data",
principalTable: "download_clients",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "u_torrent_seeding_rules",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
download_client_config_id = table.Column(type: "uuid", nullable: false),
name = table.Column(type: "text", nullable: false),
categories = table.Column(type: "text", nullable: false),
tracker_patterns = table.Column(type: "text", nullable: false),
priority = table.Column(type: "integer", nullable: false),
privacy_type = table.Column(type: "text", nullable: false),
max_ratio = table.Column(type: "double precision", nullable: false),
min_seed_time = table.Column(type: "double precision", nullable: false),
max_seed_time = table.Column(type: "double precision", nullable: false),
min_seeders = table.Column(type: "integer", nullable: false),
delete_source_files = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_u_torrent_seeding_rules", x => x.id);
table.ForeignKey(
name: "fk_u_torrent_seeding_rules_download_clients_download_client_co",
column: x => x.download_client_config_id,
principalSchema: "data",
principalTable: "download_clients",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "unlinked_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
download_client_config_id = table.Column(type: "uuid", nullable: false),
enabled = table.Column(type: "boolean", nullable: false),
target_category = table.Column(type: "text", nullable: false),
use_tag = table.Column(type: "boolean", nullable: false),
ignored_root_dirs = table.Column>(type: "text[]", nullable: false),
categories = table.Column>(type: "text[]", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_unlinked_configs", x => x.id);
table.ForeignKey(
name: "fk_unlinked_configs_download_clients_download_client_config_id",
column: x => x.download_client_config_id,
principalSchema: "data",
principalTable: "download_clients",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "apprise_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
notification_config_id = table.Column(type: "uuid", nullable: false),
mode = table.Column(type: "text", nullable: false),
url = table.Column(type: "character varying(500)", maxLength: 500, nullable: false),
key = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
tags = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
service_urls = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_apprise_configs", x => x.id);
table.ForeignKey(
name: "fk_apprise_configs_notification_configs_notification_config_id",
column: x => x.notification_config_id,
principalSchema: "data",
principalTable: "notification_configs",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "discord_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
notification_config_id = table.Column(type: "uuid", nullable: false),
webhook_url = table.Column(type: "character varying(500)", maxLength: 500, nullable: false),
username = table.Column(type: "character varying(80)", maxLength: 80, nullable: false),
avatar_url = table.Column(type: "character varying(500)", maxLength: 500, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_discord_configs", x => x.id);
table.ForeignKey(
name: "fk_discord_configs_notification_configs_notification_config_id",
column: x => x.notification_config_id,
principalSchema: "data",
principalTable: "notification_configs",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "gotify_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
notification_config_id = table.Column(type: "uuid", nullable: false),
server_url = table.Column(type: "character varying(500)", maxLength: 500, nullable: false),
application_token = table.Column(type: "character varying(200)", maxLength: 200, nullable: false),
priority = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_gotify_configs", x => x.id);
table.ForeignKey(
name: "fk_gotify_configs_notification_configs_notification_config_id",
column: x => x.notification_config_id,
principalSchema: "data",
principalTable: "notification_configs",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "notifiarr_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
notification_config_id = table.Column(type: "uuid", nullable: false),
api_key = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
channel_id = table.Column(type: "character varying(50)", maxLength: 50, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_notifiarr_configs", x => x.id);
table.ForeignKey(
name: "fk_notifiarr_configs_notification_configs_notification_config_",
column: x => x.notification_config_id,
principalSchema: "data",
principalTable: "notification_configs",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ntfy_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
notification_config_id = table.Column(type: "uuid", nullable: false),
server_url = table.Column(type: "character varying(500)", maxLength: 500, nullable: false),
topics = table.Column>(type: "text[]", nullable: false),
authentication_type = table.Column(type: "text", nullable: false),
username = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
password = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
access_token = table.Column(type: "character varying(500)", maxLength: 500, nullable: true),
priority = table.Column(type: "text", nullable: false),
tags = table.Column>(type: "text[]", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_ntfy_configs", x => x.id);
table.ForeignKey(
name: "fk_ntfy_configs_notification_configs_notification_config_id",
column: x => x.notification_config_id,
principalSchema: "data",
principalTable: "notification_configs",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "pushover_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
notification_config_id = table.Column(type: "uuid", nullable: false),
api_token = table.Column(type: "character varying(50)", maxLength: 50, nullable: false),
user_key = table.Column(type: "character varying(50)", maxLength: 50, nullable: false),
devices = table.Column(type: "text", nullable: false),
priority = table.Column(type: "text", nullable: false),
sound = table.Column(type: "character varying(50)", maxLength: 50, nullable: true),
retry = table.Column(type: "integer", nullable: true),
expire = table.Column(type: "integer", nullable: true),
tags = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_pushover_configs", x => x.id);
table.ForeignKey(
name: "fk_pushover_configs_notification_configs_notification_config_id",
column: x => x.notification_config_id,
principalSchema: "data",
principalTable: "notification_configs",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "telegram_configs",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
notification_config_id = table.Column(type: "uuid", nullable: false),
bot_token = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
chat_id = table.Column(type: "character varying(100)", maxLength: 100, nullable: false),
topic_id = table.Column(type: "character varying(100)", maxLength: 100, nullable: true),
send_silently = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_telegram_configs", x => x.id);
table.ForeignKey(
name: "fk_telegram_configs_notification_configs_notification_config_id",
column: x => x.notification_config_id,
principalSchema: "data",
principalTable: "notification_configs",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "slow_rules",
schema: "data",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
reset_strikes_on_progress = table.Column(type: "boolean", nullable: false),
max_time_hours = table.Column(type: "double precision", nullable: false),
min_speed = table.Column(type: "text", nullable: false),
ignore_above_size = table.Column(type: "text", nullable: true),
queue_cleaner_config_id = table.Column(type: "uuid", nullable: false),
name = table.Column(type: "text", nullable: false),
enabled = table.Column