Пример #1
0
        public override void Apply()
        {
            Database.AddTable("Providers",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Name", DbType.String.WithSize(200)),
                              new Column("Inn", DbType.String.WithSize(12)),
                              new Column("Cpp", DbType.String.WithSize(10)),
                              new Column("LegalAddress", DbType.String.WithSize(250)),
                              new Column("ActualAddress", DbType.String.WithSize(250)),
                              new Column("ContactPerson", DbType.String.WithSize(300)),
                              new Column("ContactPhone", DbType.String.WithSize(16)),
                              new Column("Email", DbType.String.WithSize(70)),
                              new Column("IsActive", DbType.Boolean, defaultValue: true)
                              );

            Database.AddColumn("Users", new Column("ProviderId", DbType.Guid));
            Database.AddColumn("Tariffs", new Column("ProviderId", DbType.Guid));
            Database.RemoveColumn("Tariffs", "CompanyId");
        }
        public override void Apply()
        {
            Database.AddTable("Countries",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Key", DbType.String.WithSize(10)),
                              new Column("Name", DbType.String.WithSize(255)));
            Database.AddIndex("Countries_ix", true, "Countries", "Key");

            AddCountry("AD", "Andorra");
            AddCountry("AE", "Utd. Arab Emir.");
            AddCountry("AF", "Afghanistan");
            AddCountry("AG", "Antigua/Barbads");
            AddCountry("AI", "Anguilla");
            AddCountry("AL", "Albania");
            AddCountry("AM", "Armenia");
            AddCountry("AN", "Dutch Antilles");
            AddCountry("AO", "Angola");
            AddCountry("AQ", "Antarctica");
            AddCountry("AR", "Argentina");
            AddCountry("AS", "Samoa,American");
            AddCountry("AT", "Austria");
            AddCountry("AU", "Australia");
            AddCountry("AW", "Aruba");
            AddCountry("AZ", "Azerbaijan");
            AddCountry("BA", "Bosnia-Herz.");
            AddCountry("BB", "Barbados");
            AddCountry("BD", "Bangladesh");
            AddCountry("BE", "Belgium");
            AddCountry("BF", "Burkina-Faso");
            AddCountry("BG", "Bulgaria");
            AddCountry("BH", "Bahrain");
            AddCountry("BI", "Burundi");
            AddCountry("BJ", "Benin");
            AddCountry("BM", "Bermuda");
            AddCountry("BN", "Brunei Dar-es-S");
            AddCountry("BO", "Bolivia");
            AddCountry("BR", "Brazil");
            AddCountry("BS", "Bahamas");
            AddCountry("BT", "Bhutan");
            AddCountry("BV", "Bouvet Island");
            AddCountry("BW", "Botswana");
            AddCountry("BY", "White Russia");
            AddCountry("BZ", "Belize");
            AddCountry("CA", "Canada");
            AddCountry("CC", "Coconut Islands");
            AddCountry("CD", "Dem. Rep. Congo");
            AddCountry("CF", "Central Afr.Rep");
            AddCountry("CG", "Rep.of Congo");
            AddCountry("CH", "Switzerland");
            AddCountry("CI", "Ivory Coast");
            AddCountry("CK", "Cook Islands");
            AddCountry("CL", "Chile");
            AddCountry("CM", "Cameroon");
            AddCountry("CN", "China");
            AddCountry("CO", "Colombia");
            AddCountry("CR", "Costa Rica");
            AddCountry("CS", "Serbia/Monten.");
            AddCountry("CU", "Cuba");
            AddCountry("CV", "Cape Verde");
            AddCountry("CX", "Christmas Islnd");
            AddCountry("CY", "Cyprus");
            AddCountry("CZ", "Czech Republic");
            AddCountry("DB", "Dubai");
            AddCountry("DE", "Germany");
            AddCountry("DJ", "Djibouti");
            AddCountry("DK", "Denmark");
            AddCountry("DM", "Dominica");
            AddCountry("DO", "Dominican Rep.");
            AddCountry("DZ", "Algeria");
            AddCountry("EC", "Ecuador");
            AddCountry("EE", "Estonia");
            AddCountry("EG", "Egypt");
            AddCountry("ER", "Eritrea");
            AddCountry("ES", "Spain");
            AddCountry("ET", "Ethiopia");
            AddCountry("FI", "Finland");
            AddCountry("FJ", "Fiji");
            AddCountry("FK", "Falkland Islnds");
            AddCountry("FM", "Micronesia");
            AddCountry("FO", "Faeroe");
            AddCountry("FR", "France");
            AddCountry("GA", "Gabon");
            AddCountry("GB", "United Kingdom");
            AddCountry("GD", "Grenada");
            AddCountry("GE", "Georgia");
            AddCountry("GF", "French Guinea");
            AddCountry("GG", "Guernsey");
            AddCountry("GH", "Ghana");
            AddCountry("GI", "Gibraltar");
            AddCountry("GL", "Greenland");
            AddCountry("GM", "Gambia");
            AddCountry("GN", "Guinea");
            AddCountry("GP", "Guadeloupe");
            AddCountry("GQ", "Equatorial Guin");
            AddCountry("GR", "Greece");
            AddCountry("GS", "S. Sandwich Ins");
            AddCountry("GT", "Guatemala");
            AddCountry("GU", "Guam");
            AddCountry("GW", "Guinea-Bissau");
            AddCountry("GY", "Guyana");
            AddCountry("HK", "Hong Kong");
            AddCountry("HM", "Heard/McDon.Isl");
            AddCountry("HN", "Honduras");
            AddCountry("HR", "Croatia");
            AddCountry("HT", "Haiti");
            AddCountry("HU", "Hungary");
            AddCountry("ID", "Indonesia");
            AddCountry("IE", "Ireland");
            AddCountry("IL", "Israel");
            AddCountry("IM", "Isle of Man");
            AddCountry("IN", "India");
            AddCountry("IO", "Brit.Ind.Oc.Ter");
            AddCountry("IQ", "Iraq");
            AddCountry("IR", "Iran");
            AddCountry("IS", "Iceland");
            AddCountry("IT", "Italy");
            AddCountry("JE", "Jersey");
            AddCountry("JM", "Jamaica");
            AddCountry("JO", "Jordan");
            AddCountry("JP", "Japan");
            AddCountry("KE", "Kenya");
            AddCountry("KG", "Kirghistan");
            AddCountry("KH", "Cambodia");
            AddCountry("KI", "Kiribati");
            AddCountry("KM", "Comoro");
            AddCountry("KN", "St.Chr.,Nevis");
            AddCountry("KP", "North Korea");
            AddCountry("KR", "South Korea");
            AddCountry("KW", "Kuwait");
            AddCountry("KY", "Cayman Islands");
            AddCountry("KZ", "Kazakhstan");
            AddCountry("LA", "Laos");
            AddCountry("LB", "Lebanon");
            AddCountry("LC", "St. Lucia");
            AddCountry("LI", "Liechtenstein");
            AddCountry("LK", "Sri Lanka");
            AddCountry("LR", "Liberia");
            AddCountry("LS", "Lesotho");
            AddCountry("LT", "Lithuania");
            AddCountry("LU", "Luxembourg");
            AddCountry("LV", "Latvia");
            AddCountry("LY", "Libya");
            AddCountry("MA", "Morocco");
            AddCountry("MC", "Monaco");
            AddCountry("MD", "Moldavia");
            AddCountry("ME", "Montenegro");
            AddCountry("MG", "Madagascar");
            AddCountry("MH", "Marshall Islnds");
            AddCountry("MK", "North Macedonia");
            AddCountry("ML", "Mali");
            AddCountry("MM", "Myanmar");
            AddCountry("MN", "Mongolia");
            AddCountry("MO", "Macau");
            AddCountry("MP", "N.Mariana Islnd");
            AddCountry("MQ", "Martinique");
            AddCountry("MR", "Mauretania");
            AddCountry("MS", "Montserrat");
            AddCountry("MT", "Malta");
            AddCountry("MU", "Mauritius");
            AddCountry("MV", "Maldives");
            AddCountry("MW", "Malawi");
            AddCountry("MX", "Mexico");
            AddCountry("MY", "Malaysia");
            AddCountry("MZ", "Mozambique");
            AddCountry("NA", "Namibia");
            AddCountry("NC", "New Caledonia");
            AddCountry("NE", "Niger");
            AddCountry("NF", "Norfolk Island");
            AddCountry("NG", "Nigeria");
            AddCountry("NI", "Nicaragua");
            AddCountry("NL", "Netherlands");
            AddCountry("NO", "Norway");
            AddCountry("NP", "Nepal");
            AddCountry("NR", "Nauru");
            AddCountry("NU", "Niue Islands");
            AddCountry("NZ", "New Zealand");
            AddCountry("OM", "Oman");
            AddCountry("PA", "Panama");
            AddCountry("PE", "Peru");
            AddCountry("PF", "Frenc.Polynesia");
            AddCountry("PG", "Pap. New Guinea");
            AddCountry("PH", "Philippines");
            AddCountry("PK", "Pakistan");
            AddCountry("PL", "Poland");
            AddCountry("PM", "St.Pier,Miquel.");
            AddCountry("PN", "Pitcairn Islnds");
            AddCountry("PR", "Puerto Rico");
            AddCountry("PS", "Palestine");
            AddCountry("PT", "Portugal");
            AddCountry("PW", "Palau");
            AddCountry("PY", "Paraguay");
            AddCountry("QA", "Qatar");
            AddCountry("RE", "Reunion");
            AddCountry("RO", "Rumania");
            AddCountry("RS", "Serbia");
            AddCountry("RU", "Russian Fed.");
            AddCountry("RW", "Rwanda");
            AddCountry("SA", "Saudi Arabia");
            AddCountry("SB", "Solomon Islands");
            AddCountry("SC", "Seychelles");
            AddCountry("SD", "Sudan");
            AddCountry("SE", "Sweden");
            AddCountry("SG", "Singapore");
            AddCountry("SH", "St. Helena");
            AddCountry("SI", "Slovenia");
            AddCountry("SJ", "Svalbard");
            AddCountry("SK", "Slovakia");
            AddCountry("SL", "Sierra Leone");
            AddCountry("SM", "San Marino");
            AddCountry("SN", "Senegal");
            AddCountry("SO", "Somalia");
            AddCountry("SR", "Suriname");
            AddCountry("SS", "South Sudan");
            AddCountry("ST", "S.Tome,Principe");
            AddCountry("STL", "Stateless");
            AddCountry("SV", "El Salvador");
            AddCountry("SY", "Syria");
            AddCountry("SZ", "Swaziland");
            AddCountry("TC", "Turksh Caicosin");
            AddCountry("TD", "Chad");
            AddCountry("TF", "French S.Territ");
            AddCountry("TG", "Togo");
            AddCountry("TH", "Thailand");
            AddCountry("TJ", "Tadzhikistan");
            AddCountry("TK", "Tokelau Islands");
            AddCountry("TM", "Turkmenistan");
            AddCountry("TN", "Tunisia");
            AddCountry("TO", "Tonga");
            AddCountry("TP", "East Timor");
            AddCountry("TR", "Turkey");
            AddCountry("TT", "Trinidad,Tobago");
            AddCountry("TV", "Tuvalu");
            AddCountry("TW", "Taiwan");
            AddCountry("TZ", "Tanzania");
            AddCountry("UA", "Ukraine");
            AddCountry("UG", "Uganda");
            AddCountry("UM", "Minor Outl.Isl.");
            AddCountry("US", "USA");
            AddCountry("UY", "Uruguay");
            AddCountry("UZ", "Uzbekistan");
            AddCountry("VA", "Vatican City");
            AddCountry("VC", "St. Vincent");
            AddCountry("VE", "Venezuela");
            AddCountry("VG", "Brit.Virgin Is.");
            AddCountry("VI", "Amer.Virgin Is.");
            AddCountry("VN", "Vietnam");
            AddCountry("VU", "Vanuatu");
            AddCountry("WF", "Wallis,Futuna");
            AddCountry("WS", "Western Samoa");
            AddCountry("XC", "Ceuta");
            AddCountry("XK", "Kosovo");
            AddCountry("XL", "Melilla");
            AddCountry("XM", "Montenegro");
            AddCountry("XS", "Serbien");
            AddCountry("YE", "Yemen");
            AddCountry("YT", "Mayotte");
            AddCountry("YU", "Yugoslavia");
            AddCountry("ZA", "South Africa");
            AddCountry("ZM", "Zambia");
            AddCountry("ZR", "Zaire");
            AddCountry("ZW", "Zimbabwe");
            AddCountry("ZZ", "BDF AG, IHB1");
        }
        public override void Apply()
        {
            Database.AddTable("Roles",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Name", DbType.String.WithSize(100)));
            Database.AddIndex("Roles_pk", true, "Roles", "Id");

            Database.AddTable("Users",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Name", DbType.String.WithSize(100)),
                              new Column("RoleId", DbType.Guid),
                              new Column("Email", DbType.String.WithSize(100)),
                              new Column("IsActive", DbType.Boolean, defaultValue: true),
                              new Column("FieldsConfig", DbType.String.WithSize(300)),
                              new Column("PasswordHash", DbType.String.WithSize(300)));
            Database.AddIndex("Users_pk", true, "Users", "Id");

            Database.AddTable("Translations",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Name", DbType.String.WithSize(100)),
                              new Column("En", DbType.String.WithSize(255)),
                              new Column("Ru", DbType.String.WithSize(255)));
            Database.AddIndex("Translations_pk", true, "Translations", "Id");

            Database.AddTable("Injections",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Type", DbType.String.WithSize(100)),
                              new Column("FileName", DbType.String.WithSize(200)),
                              new Column("Status", DbType.String.WithSize(10)),
                              new Column("ProcessTimeUtc", DbType.DateTime));
            Database.AddIndex("Injections_pk", true, "Injections", "Id");

            Database.AddTable("TaskProperties",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("TaskName", DbType.String.WithSize(100)),
                              new Column("Properties", DbType.String.WithSize(1000)));
            Database.AddIndex("TaskProperties_pk", true, "TaskProperties", "Id");

            Database.AddTable("Orders",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Status", DbType.Int32, ColumnProperty.Null),
                              new Column("OrderNumber", DbType.String.WithSize(100)),
                              new Column("OrderDate", DbType.DateTime, ColumnProperty.Null),
                              new Column("OrderType", DbType.Int32, ColumnProperty.Null),
                              new Column("Payer", DbType.String.WithSize(100)),
                              new Column("ClientName", DbType.String.WithSize(255)),
                              new Column("SoldTo", DbType.String.WithSize(100)),
                              new Column("TemperatureMin", DbType.Int32, ColumnProperty.Null),
                              new Column("TemperatureMax", DbType.Int32, ColumnProperty.Null),
                              new Column("ShippingDate", DbType.DateTime, ColumnProperty.Null),
                              new Column("TransitDays", DbType.Int32, ColumnProperty.Null),
                              new Column("DeliveryDate", DbType.DateTime, ColumnProperty.Null),
                              new Column("BDFInvoiceNumber", DbType.String.WithSize(100)),
                              new Column("InvoiceNumber", DbType.String.WithSize(100)),
                              new Column("ArticlesCount", DbType.Int32, ColumnProperty.Null),
                              new Column("BoxesCount", DbType.Int32, ColumnProperty.Null),
                              new Column("ConfirmedBoxesCount", DbType.Int32, ColumnProperty.Null),
                              new Column("PalletsCount", DbType.Int32, ColumnProperty.Null),
                              new Column("ConfirmedPalletsCount", DbType.Int32, ColumnProperty.Null),
                              new Column("ActualPalletsCount", DbType.Int32, ColumnProperty.Null),
                              new Column("WeightKg", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("ActualWeightKg", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("OrderAmountExcludingVAT", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("InvoiceAmountExcludingVAT", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("DeliveryRegion", DbType.String.WithSize(255)),
                              new Column("DeliveryCity", DbType.String.WithSize(255)),
                              new Column("ShippingAddress", DbType.String.WithSize(500)),
                              new Column("DeliveryAddress", DbType.String.WithSize(500)),
                              new Column("ShippingStatus", DbType.Int32, ColumnProperty.Null),
                              new Column("DeliveryStatus", DbType.Int32, ColumnProperty.Null),
                              new Column("ClientAvisationTime", DbType.Time, ColumnProperty.Null),
                              new Column("OrderComments", DbType.String.WithSize(1000)),
                              new Column("PickingTypeId", DbType.Guid, ColumnProperty.Null),
                              new Column("PlannedArrivalTimeSlotBDFWarehouse", DbType.String.WithSize(255)),
                              new Column("LoadingArrivalTime", DbType.DateTime, ColumnProperty.Null),
                              new Column("LoadingDepartureTime", DbType.DateTime, ColumnProperty.Null),
                              new Column("UnloadingArrivalTime", DbType.Date, ColumnProperty.Null),
                              new Column("UnloadingDepartureTime", DbType.Date, ColumnProperty.Null),
                              new Column("TrucksDowntime", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("ReturnInformation", DbType.String.WithSize(1000)),
                              new Column("ReturnShippingAccountNo", DbType.String.WithSize(100)),
                              new Column("PlannedReturnDate", DbType.DateTime, ColumnProperty.Null),
                              new Column("ActualReturnDate", DbType.DateTime, ColumnProperty.Null),
                              new Column("MajorAdoptionNumber", DbType.String.WithSize(100)),
                              new Column("OrderCreationDate", DbType.DateTime, ColumnProperty.Null),
                              new Column("ShippingId", DbType.Guid, ColumnProperty.Null),
                              new Column("ShippingWarehouseId", DbType.Guid, ColumnProperty.Null),
                              new Column("DeliveryWarehouseId", DbType.Guid, ColumnProperty.Null));
            Database.AddIndex("Orders_pk", true, "Orders", "Id");
            Database.AddIndex("Orders_Shipping_fk", false, "Orders", "ShippingId");
            Database.AddIndex("Orders_ShippingWarehouse_fk", false, "Orders", "ShippingWarehouseId");
            Database.AddIndex("Orders_DeliveryWarehouse_fk", false, "Orders", "DeliveryWarehouseId");

            Database.AddTable("OrderItems",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("OrderId", DbType.Guid),
                              new Column("Nart", DbType.String.WithSize(100)),
                              new Column("Quantity", DbType.Int32));
            Database.AddIndex("OrderItems_pk", true, "OrderItems", "Id");
            Database.AddIndex("OrderItems_Order_fk", false, "OrderItems", "OrderId");

            Database.AddTable("Shippings",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("ShippingNumber", DbType.String.WithSize(100)),
                              new Column("DeliveryType", DbType.Int32, ColumnProperty.Null),
                              new Column("TemperatureMin", DbType.Int32, ColumnProperty.Null),
                              new Column("TemperatureMax", DbType.Int32, ColumnProperty.Null),
                              new Column("TarifficationType", DbType.Int32, ColumnProperty.Null),
                              new Column("CarrierId", DbType.Guid, ColumnProperty.Null),
                              new Column("VehicleTypeId", DbType.Guid, ColumnProperty.Null),
                              new Column("PalletsCount", DbType.Int32, ColumnProperty.Null),
                              new Column("ManualPalletsCount", DbType.Boolean, defaultValue: false),
                              new Column("ActualPalletsCount", DbType.Int32, ColumnProperty.Null),
                              new Column("ManualActualPalletsCount", DbType.Boolean, defaultValue: false),
                              new Column("ConfirmedPalletsCount", DbType.Int32, ColumnProperty.Null),
                              new Column("ManualConfirmedPalletsCount", DbType.Boolean, defaultValue: false),
                              new Column("WeightKg", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("ManualWeightKg", DbType.Boolean, defaultValue: false),
                              new Column("ActualWeightKg", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("ManualActualWeightKg", DbType.Boolean, defaultValue: false),
                              new Column("PlannedArrivalTimeSlotBDFWarehouse", DbType.String.WithSize(255)),
                              new Column("LoadingArrivalTime", DbType.DateTime, ColumnProperty.Null),
                              new Column("LoadingDepartureTime", DbType.DateTime, ColumnProperty.Null),
                              new Column("DeliveryInvoiceNumber", DbType.String.WithSize(100)),
                              new Column("DeviationReasonsComments", DbType.String.WithSize(1000)),
                              new Column("TotalDeliveryCost", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("ManualTotalDeliveryCost", DbType.Boolean, defaultValue: false),
                              new Column("OtherCosts", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("DeliveryCostWithoutVAT", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("ReturnCostWithoutVAT", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("InvoiceAmountWithoutVAT", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("AdditionalCostsWithoutVAT", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("AdditionalCostsComments", DbType.String.WithSize(1000)),
                              new Column("TrucksDowntime", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("ManualTrucksDowntime", DbType.Boolean, defaultValue: false),
                              new Column("ReturnRate", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("AdditionalPointRate", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("DowntimeRate", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("BlankArrivalRate", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("BlankArrival", DbType.Boolean, defaultValue: false),
                              new Column("Waybill", DbType.Boolean, defaultValue: false),
                              new Column("WaybillTorg12", DbType.Boolean, defaultValue: false),
                              new Column("TransportWaybill", DbType.Boolean, defaultValue: false),
                              new Column("Invoice", DbType.Boolean, defaultValue: false),
                              new Column("DocumentsReturnDate", DbType.DateTime, ColumnProperty.Null),
                              new Column("ActualDocumentsReturnDate", DbType.DateTime, ColumnProperty.Null),
                              new Column("InvoiceNumber", DbType.String.WithSize(100)),
                              new Column("Status", DbType.Int32, ColumnProperty.Null),
                              new Column("CostsConfirmedByShipper", DbType.Boolean, defaultValue: false),
                              new Column("CostsConfirmedByCarrier", DbType.Boolean, defaultValue: false));
            Database.AddIndex("Shippings_pk", true, "Shippings", "Id");

            Database.AddTable("Tariffs",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("ShipmentCity", DbType.String.WithSize(255)),
                              new Column("DeliveryCity", DbType.String.WithSize(255)),
                              new Column("TarifficationType", DbType.Int32, ColumnProperty.Null),
                              new Column("CarrierId", DbType.Guid, ColumnProperty.Null),
                              new Column("VehicleTypeId", DbType.Guid, ColumnProperty.Null),
                              new Column("FTLRate", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate1", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate2", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate3", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate4", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate5", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate6", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate7", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate8", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate9", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate10", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate11", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate12", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate13", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate14", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate15", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate16", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate17", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate18", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate19", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate20", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate21", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate22", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate23", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate24", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate25", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate26", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate27", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate28", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate29", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate30", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate31", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate32", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null),
                              new Column("LTLRate33", DbType.Decimal.WithSize(19, 5), ColumnProperty.Null));
            Database.AddIndex("Tariffs_pk", true, "Tariffs", "Id");

            Database.AddTable("Warehouses",
                              new Column("WarehouseName", DbType.String.WithSize(255)),
                              new Column("SoldToNumber", DbType.String.WithSize(100)),
                              new Column("Region", DbType.String.WithSize(255)),
                              new Column("City", DbType.String.WithSize(255)),
                              new Column("Address", DbType.String.WithSize(500)),
                              new Column("PickingTypeId", DbType.Guid, ColumnProperty.Null),
                              new Column("LeadtimeDays", DbType.Int32, ColumnProperty.Null),
                              new Column("CustomerWarehouse", DbType.Boolean, defaultValue: true),
                              new Column("UsePickingType", DbType.Boolean, defaultValue: false),
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey));
            Database.AddIndex("warehouses_pk", true, "Warehouses", "Id");

            Database.AddTable("Articles",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("SPGR", DbType.String.WithSize(100), ColumnProperty.Null),
                              new Column("Description", DbType.String.WithSize(255), ColumnProperty.Null),
                              new Column("Nart", DbType.String.WithSize(100)),
                              new Column("CountryOfOrigin", DbType.String.WithSize(255), ColumnProperty.Null),
                              new Column("ShelfLife", DbType.Int32, ColumnProperty.Null),
                              new Column("Status", DbType.String.WithSize(100)),
                              new Column("Ean", DbType.String.WithSize(100), ColumnProperty.Null),
                              new Column("UnitLengthGoodsMm", DbType.Int32, ColumnProperty.Null),
                              new Column("WidthUnitsGoodsMm", DbType.Int32, ColumnProperty.Null),
                              new Column("UnitHeightGoodsMm", DbType.Int32, ColumnProperty.Null),
                              new Column("WeightUnitsGrossProductG", DbType.Int32, ColumnProperty.Null),
                              new Column("WeightUnitsNetGoodsG", DbType.Int32, ColumnProperty.Null),
                              new Column("EANShrink", DbType.String.WithSize(100), ColumnProperty.Null),
                              new Column("PiecesInShrink", DbType.Int32, ColumnProperty.Null),
                              new Column("LengthShrinkMm", DbType.Int32, ColumnProperty.Null),
                              new Column("WidthShrinkMm", DbType.Int32, ColumnProperty.Null),
                              new Column("HeightShrinkMm", DbType.Int32, ColumnProperty.Null),
                              new Column("GrossShrinkWeightG", DbType.Int32, ColumnProperty.Null),
                              new Column("NetWeightShrinkG", DbType.Int32, ColumnProperty.Null),
                              new Column("EANBox", DbType.String.WithSize(100), ColumnProperty.Null),
                              new Column("PiecesInABox", DbType.Int32, ColumnProperty.Null),
                              new Column("BoxLengthMm", DbType.Int32, ColumnProperty.Null),
                              new Column("WidthOfABoxMm", DbType.Int32, ColumnProperty.Null),
                              new Column("BoxHeightMm", DbType.Int32, ColumnProperty.Null),
                              new Column("GrossBoxWeightG", DbType.Int32, ColumnProperty.Null),
                              new Column("NetBoxWeightG", DbType.Int32, ColumnProperty.Null),
                              new Column("PiecesInALayer", DbType.Int32, ColumnProperty.Null),
                              new Column("LayerLengthMm", DbType.Int32, ColumnProperty.Null),
                              new Column("LayerWidthMm", DbType.Int32, ColumnProperty.Null),
                              new Column("LayerHeightMm", DbType.Int32, ColumnProperty.Null),
                              new Column("GrossLayerWeightMm", DbType.Int32, ColumnProperty.Null),
                              new Column("NetWeightMm", DbType.Int32, ColumnProperty.Null),
                              new Column("EANPallet", DbType.String.WithSize(100), ColumnProperty.Null),
                              new Column("PiecesOnAPallet", DbType.Int32, ColumnProperty.Null),
                              new Column("PalletLengthMm", DbType.Int32, ColumnProperty.Null),
                              new Column("WidthOfPalletsMm", DbType.Int32, ColumnProperty.Null),
                              new Column("PalletHeightMm", DbType.Int32, ColumnProperty.Null),
                              new Column("GrossPalletWeightG", DbType.Int32, ColumnProperty.Null),
                              new Column("NetWeightPalletsG", DbType.Int32, ColumnProperty.Null));
            Database.AddIndex("Articles_pk", true, "Articles", "Id");

            Database.AddTable("TransportCompanies",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Title", DbType.String.WithSize(255)),
                              new Column("ContractNumber", DbType.String.WithSize(255)),
                              new Column("DateOfPowerOfAttorney", DbType.String.WithSize(255)));
            Database.AddIndex("TransportCompanies_pk", true, "TransportCompanies", "Id");

            Database.AddTable("VehicleTypes",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Name", DbType.String.WithSize(255), ColumnProperty.NotNull));
            Database.AddIndex("VehicleTypes_pk", true, "VehicleTypes", "Id");

            Database.AddTable("PickingTypes",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Name", DbType.String.WithSize(255), ColumnProperty.NotNull));
            Database.AddIndex("PickingTypes_pk", true, "PickingTypes", "Id");

            Database.AddTable("FileStorage",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Name", DbType.String.WithSize(255), ColumnProperty.NotNull),
                              new Column("Data", DbType.Binary, ColumnProperty.NotNull));
            Database.AddIndex("FileStorage_pk", true, "FileStorage", "Id");

            Database.AddTable("DocumentTypes",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Name", DbType.String.WithSize(255), ColumnProperty.NotNull));
            Database.AddIndex("DocumentTypes_pk", true, "DocumentTypes", "Id");

            Database.AddTable("Documents",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("Name", DbType.String.WithSize(255), ColumnProperty.NotNull),
                              new Column("PersistableId", DbType.Guid, ColumnProperty.NotNull),
                              new Column("FileId", DbType.Guid, ColumnProperty.NotNull),
                              new Column("TypeId", DbType.Guid, ColumnProperty.Null));
            Database.AddIndex("Documents_pk", true, "Documents", "Id");
            Database.AddIndex("Documents_PersistableId_ix", false, "Documents", "PersistableId");

            Database.AddTable("HistoryEntries",
                              new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey),
                              new Column("PersistableId", DbType.Guid, ColumnProperty.NotNull),
                              new Column("UserId", DbType.Guid, ColumnProperty.Null),
                              new Column("UserName", DbType.String.WithSize(255)),
                              new Column("CreatedAt", DbType.DateTime),
                              new Column("MessageKey", DbType.String.WithSize(100)),
                              new Column("MessageArgs", DbType.String.WithSize(int.MaxValue)));
            Database.AddIndex("HistoryEntries_pk", true, "HistoryEntries", "Id");
            Database.AddIndex("HistoryEntries_PersistableId_ix", false, "HistoryEntries", "PersistableId");
        }