using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AMREZ.EOP.Infrastructures.Migrations
{
///
public partial class AddProductMasterData : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
name: "master");
migrationBuilder.CreateTable(
name: "allergens",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_allergens", x => x.Id);
table.UniqueConstraint("AK_allergens_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_allergens_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_allergens_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "brands",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
ExternalRef = table.Column(type: "text", nullable: true),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_brands", x => x.Id);
table.UniqueConstraint("AK_brands_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_brands_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_brands_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "categories",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
ParentId = table.Column(type: "uuid", nullable: true),
Path = table.Column(type: "text", nullable: true),
SortOrder = table.Column(type: "integer", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_categories", x => x.Id);
table.UniqueConstraint("AK_categories_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_categories_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_categories_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
table.ForeignKey(
name: "FK_categories_categories_tenant_id_ParentId",
columns: x => new { x.tenant_id, x.ParentId },
principalSchema: "master",
principalTable: "categories",
principalColumns: new[] { "tenant_id", "Id" },
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "compliance_statuses",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_compliance_statuses", x => x.Id);
table.UniqueConstraint("AK_compliance_statuses_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_compliance_statuses_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_compliance_statuses_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "countries",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_countries", x => x.Id);
table.UniqueConstraint("AK_countries_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_countries_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_countries_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "currencies",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
Exponent = table.Column(type: "smallint", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_currencies", x => x.Id);
table.UniqueConstraint("AK_currencies_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_currencies_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_currencies_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "doc_control_statuses",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_doc_control_statuses", x => x.Id);
table.UniqueConstraint("AK_doc_control_statuses_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_doc_control_statuses_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_doc_control_statuses_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "func_tests",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_func_tests", x => x.Id);
table.UniqueConstraint("AK_func_tests_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_func_tests_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_func_tests_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "hazard_classes",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_hazard_classes", x => x.Id);
table.UniqueConstraint("AK_hazard_classes_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_hazard_classes_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_hazard_classes_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "languages",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_languages", x => x.Id);
table.UniqueConstraint("AK_languages_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_languages_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_languages_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "manufacturers",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
CountryCode = table.Column(type: "text", nullable: true),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_manufacturers", x => x.Id);
table.UniqueConstraint("AK_manufacturers_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_manufacturers_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_manufacturers_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "markets",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_markets", x => x.Id);
table.UniqueConstraint("AK_markets_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_markets_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_markets_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "packing_groups",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_packing_groups", x => x.Id);
table.UniqueConstraint("AK_packing_groups_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_packing_groups_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_packing_groups_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "qa_stages",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_qa_stages", x => x.Id);
table.UniqueConstraint("AK_qa_stages_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_qa_stages_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_qa_stages_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "qc_statuses",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_qc_statuses", x => x.Id);
table.UniqueConstraint("AK_qc_statuses_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_qc_statuses_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_qc_statuses_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "recall_classes",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
NameI18n = table.Column(type: "jsonb", nullable: true),
OverridesGlobalId = table.Column(type: "uuid", nullable: true),
IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true),
IsSystem = table.Column(type: "boolean", nullable: false, defaultValue: false),
Meta = table.Column(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_recall_classes", x => x.Id);
table.UniqueConstraint("AK_recall_classes_tenant_id_Id", x => new { x.tenant_id, x.Id });
table.CheckConstraint("ck_recall_classes_tenant_not_null", "tenant_id is not null");
table.CheckConstraint("ck_recall_classes_tenant_not_zero", "tenant_id <> '00000000-0000-0000-0000-000000000000'");
});
migrationBuilder.CreateTable(
name: "risk_classes",
schema: "master",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
tenant_id = table.Column(type: "uuid", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now() at time zone 'utc'"),
created_by = table.Column(type: "text", nullable: true),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
updated_by = table.Column(type: "text", nullable: true),
is_deleted = table.Column(type: "boolean", nullable: false, defaultValue: false),
Scope = table.Column(type: "text", nullable: false, defaultValue: "global"),
Code = table.Column